Skip to content

Commit

Permalink
Update lynx deployment yml configurations and scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
derekpierre committed Oct 31, 2023
1 parent c74236a commit 617a8af
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 43 deletions.
32 changes: 17 additions & 15 deletions deployment/constructor_params/lynx/child.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,23 @@ constants:
contracts:
- MockPolygonChild
- LynxTACoChildApplication:
_rootApplication: $MockPolygonChild
_minimumAuthorization: $FORTY_THOUSAND_TOKENS_IN_WEI_UNITS
- TransparentUpgradeableProxy:
_logic: $LynxTACoChildApplication
initialOwner: $deployer
_data: 0x
proxy:
wrap_container: TACoChildApplication
constructor:
_rootApplication: $MockPolygonChild
_minimumAuthorization: $FORTY_THOUSAND_TOKENS_IN_WEI_UNITS
- LynxRitualToken:
_totalSupplyOfTokens: $TEN_MILLION_TOKENS_IN_WEI_UNITS
constructor:
_totalSupplyOfTokens: $TEN_MILLION_TOKENS_IN_WEI_UNITS
- Coordinator:
_application: $TransparentUpgradeableProxy:LynxTACoChildApplication
_timeout: $ONE_HOUR_IN_SECONDS
_maxDkgSize: 4
_admin: $deployer
_currency: $LynxRitualToken
_feeRatePerSecond: 1
constructor:
_application: $proxy:LynxTACoChildApplication
_timeout: $ONE_HOUR_IN_SECONDS
_maxDkgSize: 4
_admin: $deployer
_currency: $LynxRitualToken
_feeRatePerSecond: 1
- GlobalAllowList:
_coordinator: $Coordinator
_admin: $deployer
constructor:
_coordinator: $Coordinator
_admin: $deployer
26 changes: 13 additions & 13 deletions deployment/constructor_params/lynx/root.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ constants:

contracts:
- LynxStakingToken:
_totalSupplyOfTokens: $TEN_MILLION_TOKENS_IN_WEI_UNITS
constructor:
_totalSupplyOfTokens: $TEN_MILLION_TOKENS_IN_WEI_UNITS
- TestnetThresholdStaking
- TACoApplication:
_token: $LynxStakingToken
_tStaking: $TestnetThresholdStaking
_minimumAuthorization: $FORTY_THOUSAND_TOKENS_IN_WEI_UNITS
_minOperatorSeconds: $IN_SECONDS_1_HOUR
_rewardDuration: $IN_SECONDS_7_DAYS
_deauthorizationDuration: $IN_SECONDS_60_DAYS
_commitmentDurationOptions: [$IN_SECONDS_182_DAYS, $IN_SECONDS_364_DAYS]
- TransparentUpgradeableProxy:
_logic: $TACoApplication
initialOwner: $deployer
_data: 0x
proxy:
constructor:
_token: $LynxStakingToken
_tStaking: $TestnetThresholdStaking
_minimumAuthorization: $FORTY_THOUSAND_TOKENS_IN_WEI_UNITS
_minOperatorSeconds: $IN_SECONDS_1_HOUR
_rewardDuration: $IN_SECONDS_7_DAYS
_deauthorizationDuration: $IN_SECONDS_60_DAYS
_commitmentDurationOptions: [$IN_SECONDS_182_DAYS, $IN_SECONDS_364_DAYS]
- MockPolygonRoot:
_rootApplication: $TransparentUpgradeableProxy:TACoApplication
constructor:
_rootApplication: $proxy:TACoApplication
14 changes: 4 additions & 10 deletions scripts/lynx/deploy_child.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/python3

from ape import project
from deployment.constants import CONSTRUCTOR_PARAMS_DIR, OZ_DEPENDENCY

from deployment.constants import CONSTRUCTOR_PARAMS_DIR
from deployment.params import Deployer

VERIFY = False
Expand All @@ -25,26 +26,19 @@ def main():
deployer = Deployer.from_yaml(filepath=CONSTRUCTOR_PARAMS_FILEPATH, verify=VERIFY)

mock_polygon_child = deployer.deploy(project.MockPolygonChild)

taco_implementation = deployer.deploy(project.LynxTACoChildApplication)

proxy = deployer.deploy(OZ_DEPENDENCY.TransparentUpgradeableProxy)
taco_child_application = deployer.proxy(project.TACoChildApplication, proxy)

taco_child_application = deployer.deploy(project.LynxTACoChildApplication)
deployer.transact(mock_polygon_child.setChildApplication, taco_child_application.address)

ritual_token = deployer.deploy(project.LynxRitualToken)

coordinator = deployer.deploy(project.Coordinator)

deployer.transact(taco_child_application.initialize, coordinator.address)

global_allow_list = deployer.deploy(project.GlobalAllowList)

deployments = [
mock_polygon_child,
taco_implementation, # implementation (contract name is different than proxy contract)
taco_child_application, # proxy
taco_child_application,
ritual_token,
coordinator,
global_allow_list,
Expand Down
7 changes: 2 additions & 5 deletions scripts/lynx/deploy_root.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/python3

from ape import project
from deployment.constants import CONSTRUCTOR_PARAMS_DIR, OZ_DEPENDENCY
from deployment.constants import CONSTRUCTOR_PARAMS_DIR
from deployment.params import Deployer

VERIFY = False
Expand All @@ -27,10 +27,7 @@ def main():

mock_threshold_staking = deployer.deploy(project.TestnetThresholdStaking)

_ = deployer.deploy(project.TACoApplication)

proxy = deployer.deploy(OZ_DEPENDENCY.TransparentUpgradeableProxy)
taco_application = deployer.proxy(project.TACoApplication, proxy)
taco_application = deployer.deploy(project.TACoApplication)

deployer.transact(mock_threshold_staking.setApplication, taco_application.address)

Expand Down

0 comments on commit 617a8af

Please sign in to comment.