Skip to content

Conversation

0xsuryansh
Copy link
Member

No description provided.

# Conflicts:
#	chains/evm/.gas-snapshot
#	chains/evm/contracts/test/offRamp/OffRamp/OffRamp.executeSingleMessage.t.sol
#	chains/evm/gobindings/generation/generated-wrapper-dependency-versions-do-not-edit.txt
#	chains/evm/scripts/compile_all
# Conflicts:
#	chains/evm/.gas-snapshot
#	chains/evm/contracts/test/offRamp/OffRamp/OffRamp.executeSingleMessage.t.sol
#	chains/evm/gobindings/generation/generated-wrapper-dependency-versions-do-not-edit.txt
#	chains/evm/scripts/compile_all
# Conflicts:
#	chains/evm/.gas-snapshot
#	chains/evm/gobindings/generation/generated-wrapper-dependency-versions-do-not-edit.txt
# Conflicts:
#	chains/evm/.gas-snapshot
#	chains/evm/contracts/pools/TokenPool.sol
#	chains/evm/gobindings/generated/latest/burn_from_mint_token_pool/burn_from_mint_token_pool.go
#	chains/evm/gobindings/generated/latest/burn_mint_token_pool/burn_mint_token_pool.go
#	chains/evm/gobindings/generated/latest/burn_mint_with_lock_release_flag_token_pool/burn_mint_with_lock_release_flag_token_pool.go
#	chains/evm/gobindings/generated/latest/burn_to_address_mint_token_pool/burn_to_address_mint_token_pool.go
#	chains/evm/gobindings/generated/latest/burn_with_from_mint_token_pool/burn_with_from_mint_token_pool.go
#	chains/evm/gobindings/generated/latest/lock_release_token_pool/lock_release_token_pool.go
#	chains/evm/gobindings/generated/latest/mock_lbtc_token_pool/mock_lbtc_token_pool.go
#	chains/evm/gobindings/generated/latest/siloed_lock_release_token_pool/siloed_lock_release_token_pool.go
#	chains/evm/gobindings/generated/latest/siloed_usdc_token_pool/siloed_usdc_token_pool.go
#	chains/evm/gobindings/generated/latest/token_pool/token_pool.go
#	chains/evm/gobindings/generated/latest/usdc_token_pool/usdc_token_pool.go
#	chains/evm/gobindings/generated/latest/usdc_token_pool_cctp_v2/usdc_token_pool_cctp_v2.go
#	chains/evm/gobindings/generation/generated-wrapper-dependency-versions-do-not-edit.txt
# Conflicts:
#	chains/evm/.gas-snapshot
#	chains/evm/contracts/pools/TokenPool.sol
#	chains/evm/contracts/test/pools/TokenPool/TokenPool.setFastTransferRateLimitConfig.t.sol
#	chains/evm/contracts/test/pools/TokenPool/TokenPool.validateReleaseOrMint.t.sol
#	chains/evm/gobindings/generated/latest/burn_from_mint_token_pool/burn_from_mint_token_pool.go
#	chains/evm/gobindings/generated/latest/usdc_token_pool/usdc_token_pool.go
#	chains/evm/gobindings/generated/latest/usdc_token_pool_cctp_v2/usdc_token_pool_cctp_v2.go
# Conflicts:
#	chains/evm/.gas-snapshot
#	chains/evm/gobindings/generated/latest/usdc_token_pool/usdc_token_pool.go
#	chains/evm/gobindings/generated/latest/usdc_token_pool_cctp_v2/usdc_token_pool_cctp_v2.go
#	chains/evm/gobindings/generation/generated-wrapper-dependency-versions-do-not-edit.txt
# Conflicts:
#	chains/evm/.gas-snapshot
#	chains/evm/contracts/pools/TokenPool.sol
#	chains/evm/contracts/test/helpers/TokenPoolV2Helper.sol
#	chains/evm/contracts/test/pools/TokenPool/TokenPool.applyFee.t.sol
#	chains/evm/contracts/test/pools/TokenPool/TokenPool.applyFinalityConfigUpdates.t.sol
#	chains/evm/contracts/test/pools/TokenPool/TokenPool.validateLockOrBurn.t.sol
#	chains/evm/contracts/test/pools/TokenPool/TokenPool.validateReleaseOrMint.t.sol
@0xsuryansh 0xsuryansh force-pushed the new-token-pool-billing branch from 6c28681 to 2cb4a0d Compare October 9, 2025 11:15
@0xsuryansh
Copy link
Member Author

base will change to develop when rename and lockOrBurn split PRs are merged

Copy link

github-actions bot commented Oct 9, 2025

Metric new-token-pool-billing lockOrBurn-split
Coverage 69.4% 69.0%

event InboundRateLimitConsumed(uint64 indexed remoteChainSelector, address token, uint256 amount);
event CCVConfigUpdated(uint64 indexed remoteChainSelector, address[] outboundCCVs, address[] inboundCCVs);
event FinalityConfigUpdated(uint16 finalityConfig, uint16 customFinalityTransferFeeBps);
event FinalityThresholdUpdated(uint16 finalityConfig);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
event FinalityThresholdUpdated(uint16 finalityConfig);
event FinalityThresholdUpdated(uint16 finalityThreshold);

Also, useful to emit the previous one?

// | 0 means the default finality.
uint16 customFinalityTransferFeeBps; // ─╯ Fee in basis points for custom finality transfers [0-10_000].
// 0 means the default finality.
uint16 finalityThreshold; // Minimum block depth on the source chain that token issuers consider sufficiently secure
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't seen this comment pattern before, should we just keep everything in-line?

Suggested change
uint16 finalityThreshold; // Minimum block depth on the source chain that token issuers consider sufficiently secure
uint16 finalityThreshold; // Minimum block depth on the source chain that token issuers consider sufficiently secure (0 means default finality)

destAmount -= (lockOrBurnIn.amount * s_finalityConfig.customFinalityTransferFeeBps) / BPS_DIVIDER;
}
// TODO : default finality transfer fee
uint256 feeBps = finality != WAIT_FOR_FINALITY
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WAIT_FOR_FINALITY terminology doesn't seem correct given that we changed the name to "custom finality". Because even using a custom finality, you are still waiting for a measure of finality, just a custom one instead of the default. Would DEFAULT_FINALITY work better? We use the term "default finality" in comments already, so it is clear to understand what this is referring to.

Suggested change
uint256 feeBps = finality != WAIT_FOR_FINALITY
uint256 feeBps = finality != DEFAULT_FINALITY

EnumerableSet.Bytes32Set remotePools; // Set of remote pool hashes, ABI encoded in the case of a remote EVM chain.
}

struct CustomFinalityConfig {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could just have finalityThreshold as a storage variable now.

Base automatically changed from lockOrBurn-split to develop October 13, 2025 13:00
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.

2 participants