Skip to content

fix(tip20): address rewards review comments#4169

Open
decofe wants to merge 1 commit into
rus/perf-tip20-rewards-v2from
fix/pr-4161-review-comments
Open

fix(tip20): address rewards review comments#4169
decofe wants to merge 1 commit into
rus/perf-tip20-rewards-v2from
fix/pr-4161-review-comments

Conversation

@decofe
Copy link
Copy Markdown
Member

@decofe decofe commented May 22, 2026

Addresses review comments on #4161.\n\nChanges:\n- Rename packed balance storage type to TIP20UserState.\n- Replace boolean opted-in supply updater with explicit increase/decrease helpers.\n- Simplify reward updates to avoid cached storage-read arguments.\n- Rename RewardFlag constructor to from_delegate and use old_flag/new_flag naming.\n- Checkpoint reward_per_token when opting into T6 rewards.\n\nValidation:\n- cargo check -p tempo-precompiles\n- cargo test -p tempo-precompiles tip20::rewards

@github-actions
Copy link
Copy Markdown
Contributor

📊 Tempo Precompiles Coverage

precompiles

Coverage: 5642/8434 lines (66.90%)

File details
File Lines Coverage
src/account_keychain/dispatch.rs 35/94 37.23%
src/account_keychain/mod.rs 279/785 35.54%
src/address_registry/dispatch.rs 31/36 86.11%
src/address_registry/mod.rs 50/60 83.33%
src/error.rs 39/117 33.33%
src/ip_validation.rs 10/10 100.00%
src/lib.rs 182/221 82.35%
src/nonce/dispatch.rs 9/10 90.00%
src/nonce/mod.rs 42/57 73.68%
src/signature_verifier/dispatch.rs 19/20 95.00%
src/signature_verifier/mod.rs 13/17 76.47%
src/stablecoin_dex/dispatch.rs 92/93 98.92%
src/stablecoin_dex/mod.rs 862/938 91.90%
src/stablecoin_dex/order.rs 120/154 77.92%
src/stablecoin_dex/orderbook.rs 157/216 72.69%
src/storage/evm.rs 192/221 86.88%
src/storage/hashmap.rs 0/158 0.00%
src/storage/mod.rs 27/27 100.00%
src/storage/packing.rs 68/93 73.12%
src/storage/thread_local.rs 165/227 72.69%
src/storage/types/array.rs 0/72 0.00%
src/storage/types/bytes_like.rs 139/183 75.96%
src/storage/types/mapping.rs 27/48 56.25%
src/storage/types/mod.rs 70/97 72.16%
src/storage/types/primitives.rs 21/24 87.50%
src/storage/types/set.rs 28/192 14.58%
src/storage/types/slot.rs 52/81 64.20%
src/storage/types/vec.rs 103/261 39.46%
src/tip20/dispatch.rs 157/173 90.75%
src/tip20/mod.rs 624/729 85.60%
src/tip20/rewards.rs 225/289 77.85%
src/tip20/roles.rs 85/88 96.59%
src/tip20_channel_reserve/dispatch.rs 0/51 0.00%
src/tip20_channel_reserve/mod.rs 3/464 0.65%
src/tip20_factory/dispatch.rs 20/21 95.24%
src/tip20_factory/mod.rs 117/140 83.57%
src/tip403_registry/dispatch.rs 55/56 98.21%
src/tip403_registry/mod.rs 302/346 87.28%
src/tip_fee_manager/amm.rs 281/392 71.68%
src/tip_fee_manager/dispatch.rs 81/83 97.59%
src/tip_fee_manager/mod.rs 57/157 36.31%
src/validator_config/dispatch.rs 38/52 73.08%
src/validator_config/mod.rs 171/227 75.33%
src/validator_config_v2/dispatch.rs 71/73 97.26%
src/validator_config_v2/mod.rs 523/581 90.02%

contracts

Coverage: 1/48 lines (2.08%)

File details
File Lines Coverage
src/lib.rs 1/1 100.00%
src/precompiles/tip20.rs 0/19 0.00%
src/precompiles/tip20_channel_reserve.rs 0/16 0.00%
src/precompiles/tip403_registry.rs 0/9 0.00%
src/precompiles/validator_config_v2.rs 0/3 0.00%

Total: 5643/8482 lines (66.53%)

📦 Download full HTML report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant