Skip to content

Commit

Permalink
Add script and params for upgrading Coordinator on tapir
Browse files Browse the repository at this point in the history
  • Loading branch information
theref committed Aug 19, 2024
1 parent 895cb1a commit fc8fd43
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
12 changes: 12 additions & 0 deletions deployment/constructor_params/tapir/upgrade-coordinator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
deployment:
name: tapir-upgrade-coordinator
chain_id: 80002

artifacts:
dir: ./deployment/artifacts/
filename: tapir-upgrade-coordinator.json

contracts:
- Coordinator:
constructor:
_application: $TACoChildApplication
29 changes: 29 additions & 0 deletions scripts/tapir/upgrade_coordinator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/python3

from ape import project

from deployment.constants import ARTIFACTS_DIR, CONSTRUCTOR_PARAMS_DIR
from deployment.params import Deployer
from deployment.registry import contracts_from_registry

VERIFY = False
CONSTRUCTOR_PARAMS_FILEPATH = CONSTRUCTOR_PARAMS_DIR / "tapir" / "upgrade-coordinator.yml"


def main():
"""
This script upgrades Coordinator on Tapir/Amoy.
"""

deployer = Deployer.from_yaml(filepath=CONSTRUCTOR_PARAMS_FILEPATH, verify=VERIFY)
instances = contracts_from_registry(filepath=ARTIFACTS_DIR / "tapir.json", chain_id=80002)

coordinator = deployer.upgrade(
project.Coordinator, instances[project.Coordinator.contract_type.name].address
)

deployments = [
coordinator,
]

deployer.finalize(deployments=deployments)

0 comments on commit fc8fd43

Please sign in to comment.