Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Coverage Report |
| const feeTokenArg = (argv.feeToken ?? '').toLowerCase() | ||
| if (feeTokenArg === 'native' || feeTokenArg === 'hbar') { | ||
| // CCIP Directory lists native HBAR as a fee token on Hedera; use ZeroAddress so EVM sends msg.value | ||
| feeToken = ZeroAddress | ||
| const wrappedNative = await source.getNativeTokenForRouter(argv.router) | ||
| feeTokenInfo = await source.getTokenInfo(wrappedNative) | ||
| feeTokenInfo = { ...feeTokenInfo, symbol: feeTokenInfo.symbol.replace(/^W/, '') || 'HBAR' } | ||
| } else if (argv.feeToken) { |
There was a problem hiding this comment.
This doesn't seem like the right abstraction level to do. this. Can this logic be moved down to the implementations of getTokenInfo? I don't know much about Hedera but it seems like we're bleeding pretty chain and token-specific behaviour into a file that's chain-agnostic.
| feeToken === ZeroAddress | ||
| ? feeTokenInfo.symbol | ||
| : feeTokenInfo.symbol.startsWith('W') | ||
| ? feeTokenInfo.symbol.substring(1) | ||
| : feeTokenInfo.symbol |
There was a problem hiding this comment.
NIT: These chains of ternaries get pretty difficult to read, I think at this point good old if-elses would read easier.
| export default [ | ||
| // FeeQuoter 2.0.0 ABI | ||
| { |
There was a problem hiding this comment.
If you look at the other ABI files in this folder, we follow a pattern where we generate them dynamically using a generate block that fetches directly from the chainlink-ccip repo. Please implement that pattern on this one too.
| Token: new Interface(Token_ABI), | ||
| TokenAdminRegistry: new Interface(TokenAdminRegistry_ABI), | ||
| FeeQuoter: new Interface(FeeQuoter_ABI), | ||
| FeeQuoter: new Interface(FeeQuoter_1_6_ABI), |
There was a problem hiding this comment.
Let's get rid of this one and keep only the versioned consts.
Uh oh!
There was an error while loading. Please reload this page.