-
Notifications
You must be signed in to change notification settings - Fork 29
feat(sui)!: also register the new its transaction upon upgrade #993
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
base: main
Are you sure you want to change the base?
Changes from all commits
cf1764d
5da5161
31289e6
31fe218
3699fd8
d3169ee
4efbbf9
cc6db01
467ccf0
37a4354
135d6ef
96989b6
60eecf3
be1b1cb
b096fbb
e5a7fa3
bb54b2d
683f429
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 |
---|---|---|
|
@@ -33,17 +33,57 @@ const CONTRACT_INFO = { | |
singletonName: 'InterchainTokenService', | ||
moduleName: 'interchain_token_service', | ||
defaultFunctions: { | ||
versions: [0, 0, 0, 0, 0, 0, 0, 0, 0], | ||
versions: [ | ||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
0, 0, 0, 0, 0, | ||
], | ||
functionNames: [ | ||
'register_coin', | ||
'register_coin_from_info', | ||
'register_coin_from_metadata', | ||
'register_custom_coin', | ||
'link_coin', | ||
'register_coin_metadata', | ||
'deploy_remote_interchain_token', | ||
'send_interchain_transfer', | ||
'receive_interchain_transfer', | ||
'receive_interchain_transfer_with_data', | ||
'receive_deploy_interchain_token', | ||
'receive_link_coin', | ||
'give_unregistered_coin', | ||
'give_unlinked_coin', | ||
'remove_unlinked_coin', | ||
'mint_as_distributor', | ||
'mint_to_as_distributor', | ||
'burn_as_distributor', | ||
'add_trusted_chains', | ||
'remove_trusted_chains', | ||
'register_transaction', | ||
'set_flow_limit', | ||
'set_flow_limit_as_token_operator', | ||
'transfer_distributorship', | ||
'transfer_operatorship', | ||
'remove_treasury_cap', | ||
'restore_treasury_cap', | ||
'allow_function', | ||
'disallow_function', | ||
'migrate_coin_metadata', | ||
'deploy_remote_interchain_token', | ||
'send_interchain_transfer', | ||
'receive_interchain_transfer', | ||
'receive_interchain_transfer_with_data', | ||
'receive_deploy_interchain_token', | ||
'give_unregistered_coin', | ||
'mint_as_distributor', | ||
'mint_to_as_distributor', | ||
'burn_as_distributor', | ||
'add_trusted_chains', | ||
'remove_trusted_chains', | ||
'set_flow_limit', | ||
'set_flow_limit_as_token_operator', | ||
'transfer_distributorship', | ||
'transfer_operatorship', | ||
'allow_function', | ||
'disallow_function', | ||
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. Bug: Interchain Functions Array Contains DuplicatesThe |
||
], | ||
}, | ||
}, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -472,6 +472,10 @@ async function migrate(keypair, client, supportedPackage, config, chain, options | |
target: `${contractConfig.address}::interchain_token_service::migrate`, | ||
arguments: [InterchainTokenService, ownerCap], | ||
}); | ||
await builder.moveCall({ | ||
target: `${contractConfig.address}::discovery::register_transaction`, | ||
arguments: [InterchainTokenService, RelayerDiscovery], | ||
}); | ||
Comment on lines
+475
to
+478
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. logic: Should verify RelayerDiscovery exists before using it to prevent runtime errors 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. Bug: Redundant Transaction Registration Causes Gas WasteA duplicate |
||
|
||
await builder.moveCall({ | ||
target: `${contractConfig.address}::discovery::register_transaction`, | ||
|
Uh oh!
There was an error while loading. Please reload this page.