Skip to content

Commit

Permalink
Merge pull request nucypher#326 from vzotova/upgrade-tapir-coordinator
Browse files Browse the repository at this point in the history
Upgrade tapir Coordinator
  • Loading branch information
derekpierre authored Sep 5, 2024
2 parents b294524 + b619df8 commit 3f53910
Show file tree
Hide file tree
Showing 2 changed files with 16 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
10 changes: 8 additions & 2 deletions scripts/tapir/upgrade_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@ 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)
# latest reinitializer function used for most recent upgrade - reinitializer(2)
# 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 3f53910

Please sign in to comment.