Skip to content

Commit

Permalink
Upgrade Coordinator: changed ABI of rituals
Browse files Browse the repository at this point in the history
  • Loading branch information
vzotova committed Aug 21, 2024
1 parent 7ef0b24 commit 7488cc6
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 104 deletions.
170 changes: 68 additions & 102 deletions deployment/artifacts/lynx.json
Original file line number Diff line number Diff line change
Expand Up @@ -4858,115 +4858,81 @@
],
"outputs": [
{
"name": "",
"name": "initiator",
"type": "address",
"internalType": "address"
},
{
"name": "initTimestamp",
"type": "uint32",
"internalType": "uint32"
},
{
"name": "endTimestamp",
"type": "uint32",
"internalType": "uint32"
},
{
"name": "totalTranscripts",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "totalAggregations",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "authority",
"type": "address",
"internalType": "address"
},
{
"name": "dkgSize",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "threshold",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "aggregationMismatch",
"type": "bool",
"internalType": "bool"
},
{
"name": "accessController",
"type": "address",
"internalType": "contract IEncryptionAuthorizer"
},
{
"name": "publicKey",
"type": "tuple",
"components": [
{
"name": "initiator",
"type": "address",
"internalType": "address"
},
{
"name": "initTimestamp",
"type": "uint32",
"internalType": "uint32"
},
{
"name": "endTimestamp",
"type": "uint32",
"internalType": "uint32"
},
{
"name": "totalTranscripts",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "totalAggregations",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "authority",
"type": "address",
"internalType": "address"
},
{
"name": "dkgSize",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "threshold",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "aggregationMismatch",
"type": "bool",
"internalType": "bool"
},
{
"name": "accessController",
"type": "address",
"internalType": "contract IEncryptionAuthorizer"
},
{
"name": "publicKey",
"type": "tuple",
"components": [
{
"name": "word0",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "word1",
"type": "bytes16",
"internalType": "bytes16"
}
],
"internalType": "struct BLS12381.G1Point"
},
{
"name": "aggregatedTranscript",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "participant",
"type": "tuple[]",
"components": [
{
"name": "provider",
"type": "address",
"internalType": "address"
},
{
"name": "aggregated",
"type": "bool",
"internalType": "bool"
},
{
"name": "transcript",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "decryptionRequestStaticKey",
"type": "bytes",
"internalType": "bytes"
}
],
"internalType": "struct Coordinator.Participant[]"
"name": "word0",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "feeModel",
"type": "address",
"internalType": "contract IFeeModel"
"name": "word1",
"type": "bytes16",
"internalType": "bytes16"
}
],
"internalType": "struct Coordinator.Ritual"
"internalType": "struct BLS12381.G1Point"
},
{
"name": "aggregatedTranscript",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "feeModel",
"type": "address",
"internalType": "contract IFeeModel"
}
]
},
Expand Down
11 changes: 9 additions & 2 deletions scripts/lynx/upgrade_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

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

VERIFY = False
CONSTRUCTOR_PARAMS_FILEPATH = CONSTRUCTOR_PARAMS_DIR / "lynx" / "upgrade-coordinator.yml"
LYNX_REGISTRY = ARTIFACTS_DIR / "lynx.json"


def main():
Expand All @@ -19,7 +20,8 @@ def main():
instances = contracts_from_registry(filepath=ARTIFACTS_DIR / "lynx.json", chain_id=80002)

implementation = deployer.deploy(project.Coordinator)
encoded_initializer_function = implementation.initializeNumberOfRituals.encode_input()
# encoded_initializer_function = implementation.initializeNumberOfRituals.encode_input()
encoded_initializer_function = b""
coordinator = deployer.upgradeTo(
implementation,
instances[project.Coordinator.contract_type.name].address,
Expand All @@ -31,3 +33,8 @@ def main():
]

deployer.finalize(deployments=deployments)
merge_registries(
registry_1_filepath=LYNX_REGISTRY,
registry_2_filepath=deployer.registry_filepath,
output_filepath=LYNX_REGISTRY,
)

0 comments on commit 7488cc6

Please sign in to comment.