diff --git a/.changelog/t7-rewards-deprecation.md b/.changelog/t7-rewards-deprecation.md new file mode 100644 index 0000000..abb0f6b --- /dev/null +++ b/.changelog/t7-rewards-deprecation.md @@ -0,0 +1,10 @@ +--- +pytempo: patch +--- + +Document T7 changes: mark the TIP-20 reward builders `distribute_reward` and +`set_reward_recipient` as deprecated (TIP-1075 — post-T7 no-ops). `claim_rewards` +stays valid: it still checkpoints and settles pre-T7 lazy accruals through T7, +and pays only already-settled balances from the T8 cleanup fork. Also note the +dynamic base fee (TIP-1067) so `max_fee_per_gas` should come from a live estimate +rather than a constant. diff --git a/README.md b/README.md index 62c381c..4b0ed86 100644 --- a/README.md +++ b/README.md @@ -234,6 +234,13 @@ Immutable, strongly-typed transaction (frozen attrs model). - `calls` (tuple[Call, ...]) - Tuple of Call objects - `access_list` (tuple[AccessListItem, ...]) - EIP-2930 access list +> **Note (T7 / TIP-1067):** the base fee is now dynamic — it floats within a +> protocol-bounded range instead of being fixed, rising under load and decaying +> when idle. The range is capped below the old fixed base fee, so fees never +> exceed pre-T7 pricing. Still set `max_fee_per_gas` from a live fee estimate +> rather than a hardcoded constant; the `2_000_000_000` values in the examples +> above are illustrative only. + **Methods:** - `sign(private_key, for_fee_payer=False)` - Sign transaction (returns new instance) diff --git a/pytempo/contracts/tip20.py b/pytempo/contracts/tip20.py index 5733b90..19122da 100644 --- a/pytempo/contracts/tip20.py +++ b/pytempo/contracts/tip20.py @@ -111,7 +111,14 @@ def change_transfer_policy_id(self, *, new_policy_id: int) -> Call: return Call.create(to=self.token, data=data) def claim_rewards(self) -> Call: - """Build a ``claimRewards()`` call.""" + """Build a ``claimRewards()`` call. + + Note: + TIP-20 rewards are deprecated by the T7 upgrade (TIP-1075): no new + rewards accrue post-T7. ``claimRewards`` stays valid — through T7 it + still checkpoints and settles pre-T7 lazy accruals, and from the T8 + cleanup fork it pays out only already-settled reward balances. + """ data = encode_calldata(_ABI, "claimRewards", []) return Call.create(to=self.token, data=data) @@ -121,7 +128,12 @@ def complete_quote_token_update(self) -> Call: return Call.create(to=self.token, data=data) def distribute_reward(self, *, amount: int) -> Call: - """Build a ``distributeReward(uint256)`` call.""" + """Build a ``distributeReward(uint256)`` call. + + .. deprecated:: T7 + TIP-20 rewards are deprecated (TIP-1075). Post-T7 this call is a + non-reverting no-op: no new rewards are distributed. + """ data = encode_calldata(_ABI, "distributeReward", [amount]) return Call.create(to=self.token, data=data) @@ -141,7 +153,12 @@ def set_next_quote_token(self, *, new_quote_token: str) -> Call: return Call.create(to=self.token, data=data) def set_reward_recipient(self, *, new_reward_recipient: str) -> Call: - """Build a ``setRewardRecipient(address)`` call.""" + """Build a ``setRewardRecipient(address)`` call. + + .. deprecated:: T7 + TIP-20 rewards are deprecated (TIP-1075). Post-T7 this call is a + non-reverting no-op: reward opt-ins/recipients no longer change. + """ data = encode_calldata(_ABI, "setRewardRecipient", [new_reward_recipient]) return Call.create(to=self.token, data=data)