-
Notifications
You must be signed in to change notification settings - Fork 2k
Update PostDeploymentValidation script #21630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2e74cfa
efbb078
163e971
6ce952d
b795326
ea7fc33
7bdd75f
9b87769
df2dfd0
87146c3
8bb1246
ffe4cbf
c3631d5
50565be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -199,26 +199,43 @@ const ( | |
| EVMFamilySelector = "2812d52c" | ||
| SVMFamilySelector = "1e10bdc4" | ||
| AptosFamilySelector = "ac77ffec" | ||
| TVMFamilySelector = "647e2ba9" | ||
| SuiFamilySelector = "c4e05953" | ||
| ) | ||
|
|
||
| // DefaultFeeQuoterDestChainConfig returns the default FeeQuoter dest chain config. | ||
| // If destChainSelector is provided, family-specific values (ChainFamilySelector, | ||
| // NetworkFeeUSDCents, DefaultTokenFeeUSDCents) are set accordingly. | ||
| func DefaultFeeQuoterDestChainConfig(configEnabled bool, destChainSelector ...uint64) fee_quoter.FeeQuoterDestChainConfig { | ||
| familySelector, _ := hex.DecodeString(EVMFamilySelector) // evm | ||
| familySelector, _ := hex.DecodeString(EVMFamilySelector) | ||
| networkFeeUSDCents := uint32(10) | ||
| defaultTokenFeeUSDCents := uint16(25) | ||
| if len(destChainSelector) > 0 { | ||
| destFamily, _ := chain_selectors.GetSelectorFamily(destChainSelector[0]) | ||
| switch destFamily { | ||
| case chain_selectors.FamilySolana: | ||
| familySelector, _ = hex.DecodeString(SVMFamilySelector) // solana | ||
| familySelector, _ = hex.DecodeString(SVMFamilySelector) | ||
| defaultTokenFeeUSDCents = 35 | ||
| case chain_selectors.FamilyAptos: | ||
| familySelector, _ = hex.DecodeString(AptosFamilySelector) // aptos | ||
| familySelector, _ = hex.DecodeString(AptosFamilySelector) | ||
| case chain_selectors.FamilyTon: | ||
| familySelector, _ = hex.DecodeString(TVMFamilySelector) | ||
| case chain_selectors.FamilySui: | ||
| familySelector, _ = hex.DecodeString(SuiFamilySelector) | ||
| case chain_selectors.FamilyEVM: | ||
| if isEthereumChain(destChainSelector[0]) { | ||
| networkFeeUSDCents = 50 | ||
| defaultTokenFeeUSDCents = 150 | ||
| } | ||
| } | ||
| } | ||
| return fee_quoter.FeeQuoterDestChainConfig{ | ||
| IsEnabled: configEnabled, | ||
| MaxNumberOfTokensPerMsg: 10, | ||
| MaxDataBytes: 30_000, | ||
| MaxPerMsgGasLimit: 3_000_000, // TODO: this needs to be updated based on RMN sig verification per chain?! 220/250K | ||
| MaxPerMsgGasLimit: 3_000_000, | ||
| DestGasOverhead: ccipevm.DestGasOverhead, | ||
| DefaultTokenFeeUSDCents: 25, | ||
| DefaultTokenFeeUSDCents: defaultTokenFeeUSDCents, | ||
| DestGasPerPayloadByteBase: ccipevm.CalldataGasPerByteBase, | ||
| DestGasPerPayloadByteHigh: ccipevm.CalldataGasPerByteHigh, | ||
| DestGasPerPayloadByteThreshold: ccipevm.CalldataGasPerByteThreshold, | ||
|
|
@@ -227,9 +244,15 @@ func DefaultFeeQuoterDestChainConfig(configEnabled bool, destChainSelector ...ui | |
| DestDataAvailabilityMultiplierBps: 1, | ||
| DefaultTokenDestGasOverhead: 90_000, | ||
| DefaultTxGasLimit: 200_000, | ||
| GasMultiplierWeiPerEth: 11e17, // Gas multiplier in wei per eth is scaled by 1e18, so 11e17 is 1.1 = 110% | ||
| NetworkFeeUSDCents: 10, | ||
| GasMultiplierWeiPerEth: 11e17, | ||
| NetworkFeeUSDCents: networkFeeUSDCents, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no gasPriceStalenessthreashold?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as previous, I just moved it to the shared package & remove the unused method, but this is good point, I think this is the reason why all the integrations have been setting the staleness threshold to zero, so I added it now |
||
| ChainFamilySelector: [4]byte(familySelector), | ||
| GasPriceStalenessThreshold: 90000, | ||
| } | ||
| } | ||
|
|
||
| func isEthereumChain(selector uint64) bool { | ||
| return selector == chain_selectors.ETHEREUM_MAINNET.Selector || | ||
| selector == chain_selectors.ETHEREUM_TESTNET_SEPOLIA.Selector || | ||
| selector == chain_selectors.ETHEREUM_TESTNET_HOODI.Selector | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DefaultFeeQuoterDestChainConfig accepts multiple destChainSelector and always consider the first one? why do we need multiple then?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was already functioning that way here (cs_chain_contracts)
https://github.com/smartcontractkit/chainlink/pull/21630/changes#diff-e8b395a3a7f5dab0bcc777f295eccf0b017ec8bfc4e7696bf55fa7f51c45dc93R1745
I just moved it here to be shared & this function before was not being used anywhere.
But this shouldnt have any impact as it is only referenced by tests and they dont usually classify a chain as Ethereum or not for these settings, but my tests does but its always just the 1 chain