-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat(sui): support all contract deployment in deploy-contract script #323
Merged
Conversation
This file contains 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
npty
force-pushed
the
chore/merge-deploy-test-into-deploy-contract
branch
from
July 30, 2024 13:32
4ac2eae
to
c29a4fd
Compare
npty
changed the title
chore: merge deploy test into deploy contract
feat: merge deploy test into deploy contract
Jul 30, 2024
npty
changed the title
feat: merge deploy test into deploy contract
feat(sui): support all contract deployment in deploy-contract script
Jul 31, 2024
milapsheth
reviewed
Jul 31, 2024
npty
force-pushed
the
chore/merge-deploy-test-into-deploy-contract
branch
from
July 31, 2024 11:10
3637904
to
a7c4242
Compare
npty
force-pushed
the
chore/merge-deploy-test-into-deploy-contract
branch
from
July 31, 2024 11:12
a7c4242
to
29b8bd1
Compare
blockchainguyy
approved these changes
Jul 31, 2024
milapsheth
reviewed
Aug 1, 2024
milapsheth
reviewed
Aug 1, 2024
milapsheth
approved these changes
Aug 1, 2024
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.
Description
AXE-4558
This PR expands contracts support for both deployment and upgrade including
Test
,AxelarGateway
, andGasService
contracts. As a generalized script to deploy and upgrade contract, it's mostly focusing on providing a clear structure to support additional contracts.There're few different sections that needs to modify/add when we need to support new contracts:
1. Package Dirs
This constant contains a list of folder names for each contract
The package names will be read from the
Move.toml
file programmatically based on givenPACKAGE_DIRS
. They will be used as a command name for the sub-commands in the deploy and upgrade commands dynamically.2. Post-Deployment Functions
These functions serve the purposes such as updating chain config, submitting additional setup transactions. Each function will be called based on the package name in a switch-case condition as follows:
3. Deploy Options
Each contract has its own set of arguments. They're defined in the
cli-utils.js
file and added to the program conditionally based on thepackageName
as follows:Changes
getSigners
andgetChannelId
methods fromsui/deploy-contract.js
tosui/utils.js
to reduce the complexity.getDomainSeparator
fromevm/utils
tocommon/utils
as we have to use it when deploys the AxelarGateway contract on Sui network as well. Also modifying a bit to allow zero hex as a default value when the env islocal
Usage
node sui/deploy-contract.js deploy AxelarGateway --signers wallet --nonce test