-
Notifications
You must be signed in to change notification settings - Fork 521
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
Add a flag to deploy
command for stake manager address
#1520
Merged
goran-ethernal
merged 4 commits into
develop
from
EVM-633-Add-a-flag-to-deploy-or-not-deploy-stake-manager
May 24, 2023
Merged
Add a flag to deploy
command for stake manager address
#1520
goran-ethernal
merged 4 commits into
develop
from
EVM-633-Add-a-flag-to-deploy-or-not-deploy-stake-manager
May 24, 2023
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
Stefan-Ethernal
approved these changes
May 17, 2023
Nemanja0x
approved these changes
May 17, 2023
Nemanja0x
approved these changes
May 17, 2023
vcastellm
requested changes
May 18, 2023
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.
As we mentioned, this need to be mandatory instead of optional and add a new SM deploy command.
goran-ethernal
force-pushed
the
EVM-633-Add-a-flag-to-deploy-or-not-deploy-stake-manager
branch
4 times, most recently
from
May 18, 2023 13:02
39c1da0
to
e1d3ddc
Compare
goran-ethernal
force-pushed
the
EVM-633-Add-a-flag-to-deploy-or-not-deploy-stake-manager
branch
from
May 18, 2023 14:27
7dd1275
to
a285718
Compare
vcastellm
reviewed
May 19, 2023
vcastellm
reviewed
May 19, 2023
vcastellm
reviewed
May 19, 2023
vcastellm
reviewed
May 19, 2023
vcastellm
reviewed
May 19, 2023
vcastellm
reviewed
May 19, 2023
vcastellm
reviewed
May 19, 2023
vcastellm
reviewed
May 19, 2023
vcastellm
approved these changes
May 23, 2023
goran-ethernal
force-pushed
the
EVM-633-Add-a-flag-to-deploy-or-not-deploy-stake-manager
branch
from
May 23, 2023 09:40
2332941
to
5c43c48
Compare
Stefan-Ethernal
approved these changes
May 23, 2023
goran-ethernal
force-pushed
the
EVM-633-Add-a-flag-to-deploy-or-not-deploy-stake-manager
branch
from
May 24, 2023 12:14
5c43c48
to
0e9ca77
Compare
11 tasks
goran-ethernal
deleted the
EVM-633-Add-a-flag-to-deploy-or-not-deploy-stake-manager
branch
May 24, 2023 13:19
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Added a
--stake-manager
flag todeploy
command which deploys rootchain contracts, which holds the address of theStakeManager
contract onrootchain
.Given flag is mandatory, so the
StakeManager
contract has to be deployed already on therootchain
. This is needed sinceStakeManager
is a single instance contract onrootchain
so it should be deployed only once.To help deployers, we provided a command that only deploys
StakeManager
contract. It is calledstake-manager-deploy
.It has these flags:
data-dir
- specifies the directory for the Polygon Edge data if the local FS is used.config
- the path to the SecretsManager config file, if omitted, the local FS secrets manager is used.private-key
- hex-encoded private key of the account which executes rootchain commands.genesis
- genesis file path, which contains chain configuration.stake-token
- address of ERC20 token used for staking on rootchain.test
- indicates if command is run in test mode. If test mode is used contract will be deployed using test account and a test stake ERC20 token will be deployed to be used for staking.Flags
data-dir
andconfig
are mutually exclusive.Flag
private-key
is mutually exclusive withdata-dir
andconfig
flags.So if the
StakeManager
deployer doesn't have secrets initialized, then he would need to use theprivate-key
flag.Flag
test
is mutually exclusive withdata-dir
,config
,private-key
andstake-token
flags, and is only used for testing purposes, since when this flag is on, test account will be used to deployStakeManager
and a mockERC20
token will be deployed and used for staking.If
test
is not used (in case when deployingStakeManager
to let's say Mumbai main net), then deployer will need to provide the address to the token that was deployed on root that will be used for staking (in this caseMatic
).stake-manager-deploy
command will update thegenesis
file and save theStakeManager
andStakeToken
addresses to theBridge
config ingenesis.json
.To summarize the flow of deploying supernet would be:
genesis
command.StakeManager
contract if it is not already deployed to therootchain
.rootchain deploy
command (provideStakeManager
address to it).SupernetManager
deployer must do it).genesis
onSupernetManager
(SupernetManager
deployer must do it).The PR also changes name of the
--native-root-token
flag infund
andstake
commands to better picture which token is in question. So the--native-root-token
flag in those commands is renamed to--stake-token
.Tagging @DannyS03 to update the docs.
Changes include
Checklist
Testing