feat: support fee-token IGP enforcement in agents#8893
Draft
paulbalaji wants to merge 2 commits into
Draft
Conversation
Collaborator
Author
|
Review pass across the stacked PRs (#8892 + #8893). Findings below; I am going to remediate these next. #8892 Solidity:
#8893 agents/scraper/SDK:
|
90b81e5 to
1242c62
Compare
Collaborator
Author
|
Remediations pushed.
Local validation passed:
CI state at last check: #8892 was green except one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the Rust agent side of exact non-native IGP fee-token support on top of #8892.
Changes:
InterchainGasPaymentwithfee_tokenand token-aware encoding/DB keysGasPaymentWithFeeTokenin Ethereum/Tron while preserving legacy fallback behaviorfee_token(messageId, destination, feeToken)feeTokenrequires origins with explicit latest/token-aware IGP metadataigpVersionandfeeTokenStack
Stacked on #8892, which adds/emits the token-aware IGP event. This PR should be reviewed after the contract/event PR.
Scraper Migration Notes
Adds scraper migration
m20260611_000008_add_gas_payment_fee_token.Migration
up():gas_payment.fee_tokenasAddress/bytea0x0000000000000000000000000000000000000000gas_payment_msg_id_fee_token_idxon(msg_id, fee_token)total_gas_paymentgrouped by(msg_id, fee_token)instead of onlymsg_idRollout notes:
fee_tokentotal_gas_paymentshould expect one row per(msg_id, fee_token), not one row permsg_idfeeTokenRollback notes:
down()recreates the legacy view only if all rows are native-token rowsfee_tokenrows exist, because dropping the column would merge distinct token amounts into one aggregate and corrupt totalsValidation
cd rust/main && cargo test -p relayer fee_token_policycd rust/main && cargo test -p hyperlane-base db_native_token_key_reads_legacy_total_after_new_native_paymentcd rust/main && cargo check -p hyperlane-base -p relayer -p scrapercd rust/main && cargo clippy -p hyperlane-base -p relayer -p scraper -- -D warningspnpm -C typescript/sdk exec mocha --config .mocharc.json ./src/metadata/agentConfig.test.ts --exitgit diff --check