Skip to content

Commit

Permalink
Upgrade tapir Coordinator
Browse files Browse the repository at this point in the history
  • Loading branch information
vzotova committed Sep 4, 2024
1 parent b294524 commit 2b9f812
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
9 changes: 8 additions & 1 deletion deployment/artifacts/tapir.json
Original file line number Diff line number Diff line change
Expand Up @@ -4350,6 +4350,13 @@
],
"outputs": []
},
{
"type": "function",
"name": "initializeNumberOfRituals",
"stateMutability": "nonpayable",
"inputs": [],
"outputs": []
},
{
"type": "function",
"name": "initiateRitual",
Expand Down Expand Up @@ -4655,7 +4662,7 @@
"stateMutability": "view",
"inputs": [
{
"name": "",
"name": "ritualId",
"type": "uint256",
"internalType": "uint256"
}
Expand Down
9 changes: 7 additions & 2 deletions scripts/tapir/upgrade_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ def main():
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
implementation = deployer.deploy(project.Coordinator)
encoded_initializer_function = implementation.initializeNumberOfRituals.encode_input()
encoded_initializer_function = b""
coordinator = deployer.upgradeTo(
implementation,
instances[project.Coordinator.contract_type.name].address,
encoded_initializer_function,
)

deployments = [
Expand Down

0 comments on commit 2b9f812

Please sign in to comment.