forked from nucypher/nucypher-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request nucypher#317 from derekpierre/ci-job-scripts
CI job for testing deployment functionality, and validate registries
- Loading branch information
Showing
4 changed files
with
124 additions
and
26 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
deployment: | ||
name: ci-child | ||
chain_id: 1337 | ||
|
||
artifacts: | ||
dir: ./deployment/artifacts/ | ||
filename: ci.json | ||
|
||
constants: | ||
ONE_HOUR_IN_SECONDS: 3600 | ||
FORTY_THOUSAND_TOKENS_IN_WEI_UNITS: 40000000000000000000000 | ||
TEN_MILLION_TOKENS_IN_WEI_UNITS: 10000000000000000000000000 # https://www.youtube.com/watch?v=EJR1H5tf5wE | ||
MAX_DKG_SIZE: 4 | ||
|
||
contracts: | ||
- MockPolygonChild | ||
- TACoChildApplication: | ||
proxy: | ||
constructor: | ||
_rootApplication: $MockPolygonChild | ||
_minimumAuthorization: $FORTY_THOUSAND_TOKENS_IN_WEI_UNITS | ||
- LynxRitualToken: | ||
constructor: | ||
_totalSupplyOfTokens: $TEN_MILLION_TOKENS_IN_WEI_UNITS | ||
- Coordinator: | ||
proxy: | ||
constructor: | ||
_data: $encode:initialize,$ONE_HOUR_IN_SECONDS,$MAX_DKG_SIZE,$deployer | ||
constructor: | ||
_application: $TACoChildApplication | ||
- GlobalAllowList: | ||
constructor: | ||
_coordinator: $Coordinator |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/usr/bin/python3 | ||
from ape import accounts, networks, project | ||
|
||
from deployment.constants import CONSTRUCTOR_PARAMS_DIR | ||
from deployment.params import Deployer | ||
|
||
VERIFY = False | ||
CONSTRUCTOR_PARAMS_FILEPATH = CONSTRUCTOR_PARAMS_DIR / "ci" / "child.yml" | ||
|
||
|
||
def main(): | ||
with networks.ethereum.local.use_provider("test"): | ||
test_account = accounts.test_accounts[0] | ||
|
||
deployer = Deployer.from_yaml( | ||
filepath=CONSTRUCTOR_PARAMS_FILEPATH, | ||
verify=VERIFY, | ||
account=test_account, | ||
non_interactive=True, | ||
) | ||
|
||
mock_polygon_child = deployer.deploy(project.MockPolygonChild) | ||
|
||
taco_child_application = deployer.deploy(project.TACoChildApplication) | ||
|
||
deployer.transact(mock_polygon_child.setChildApplication, taco_child_application.address) | ||
|
||
ritual_token = deployer.deploy(project.LynxRitualToken) | ||
|
||
coordinator = deployer.deploy(project.Coordinator) | ||
|
||
global_allow_list = deployer.deploy(project.GlobalAllowList) | ||
|
||
deployments = [ | ||
mock_polygon_child, | ||
taco_child_application, | ||
ritual_token, | ||
coordinator, | ||
global_allow_list, | ||
] | ||
|
||
deployer.finalize(deployments=deployments) | ||
|
||
# remove registry file now that task is complete | ||
deployer.registry_filepath.unlink() |