From b6b0b2297d9ed17c5b023a59e293fde43411da4b Mon Sep 17 00:00:00 2001 From: James Campbell Date: Mon, 26 Aug 2024 13:34:51 +0200 Subject: [PATCH] Deploy InfractionCollector to mainnet --- deployment/artifacts/mainnet-infraction.json | 225 ++++++++++++++++++ .../constructor_params/mainnet/infraction.yml | 9 +- scripts/mainnet/deploy_infraction.py | 3 +- 3 files changed, 234 insertions(+), 3 deletions(-) create mode 100644 deployment/artifacts/mainnet-infraction.json diff --git a/deployment/artifacts/mainnet-infraction.json b/deployment/artifacts/mainnet-infraction.json new file mode 100644 index 00000000..626ed142 --- /dev/null +++ b/deployment/artifacts/mainnet-infraction.json @@ -0,0 +1,225 @@ +{ + "137": { + "InfractionCollector": { + "address": "0x63d2A01f006D553a2348386355f8FC3028CDf3bB", + "abi": [ + { + "type": "constructor", + "stateMutability": "nonpayable", + "inputs": [ + { + "name": "_coordinator", + "type": "address", + "internalType": "contract Coordinator" + } + ] + }, + { + "type": "error", + "name": "InvalidInitialization", + "inputs": [] + }, + { + "type": "error", + "name": "NotInitializing", + "inputs": [] + }, + { + "type": "error", + "name": "OwnableInvalidOwner", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "OwnableUnauthorizedAccount", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "event", + "name": "InfractionReported", + "inputs": [ + { + "name": "ritualId", + "type": "uint32", + "internalType": "uint32", + "indexed": true + }, + { + "name": "stakingProvider", + "type": "address", + "internalType": "address", + "indexed": true + }, + { + "name": "infractionType", + "type": "uint8", + "internalType": "enum InfractionCollector.InfractionType", + "indexed": false + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint64", + "internalType": "uint64", + "indexed": false + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "internalType": "address", + "indexed": true + }, + { + "name": "newOwner", + "type": "address", + "internalType": "address", + "indexed": true + } + ], + "anonymous": false + }, + { + "type": "function", + "name": "coordinator", + "stateMutability": "view", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract Coordinator" + } + ] + }, + { + "type": "function", + "name": "infractionsForRitual", + "stateMutability": "view", + "inputs": [ + { + "name": "ritualId", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "stakingProvider", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "uint8", + "internalType": "enum InfractionCollector.InfractionType" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "function", + "name": "initialize", + "stateMutability": "nonpayable", + "inputs": [], + "outputs": [] + }, + { + "type": "function", + "name": "owner", + "stateMutability": "view", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "function", + "name": "renounceOwnership", + "stateMutability": "nonpayable", + "inputs": [], + "outputs": [] + }, + { + "type": "function", + "name": "reportMissingTranscript", + "stateMutability": "nonpayable", + "inputs": [ + { + "name": "ritualId", + "type": "uint32", + "internalType": "uint32" + }, + { + "name": "stakingProviders", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [] + }, + { + "type": "function", + "name": "tacoChildApplication", + "stateMutability": "view", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract ITACoChildApplication" + } + ] + }, + { + "type": "function", + "name": "transferOwnership", + "stateMutability": "nonpayable", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [] + } + ], + "tx_hash": "0x74b0443db26d2806253eef1c6e7b29daa67501ca935c22c04e9ded2956864804", + "block_number": 61059570, + "deployer": "0x220a8442C0f4436971CbBa565bB6888C3EDa891b" + } + } +} \ No newline at end of file diff --git a/deployment/constructor_params/mainnet/infraction.yml b/deployment/constructor_params/mainnet/infraction.yml index 489717d6..771a7d01 100644 --- a/deployment/constructor_params/mainnet/infraction.yml +++ b/deployment/constructor_params/mainnet/infraction.yml @@ -4,14 +4,21 @@ deployment: artifacts: dir: ./deployment/artifacts/ - filename: mainnet.json + filename: mainnet-infraction.json constants: # See deployment/artifacts/mainnet.json COORDINATOR_PROXY: "0xE74259e3dafe30bAA8700238e324b47aC98FE755" + # Threshold Network - References: + # - https://docs.threshold.network/resources/contract-addresses/mainnet/threshold-dao + # - https://github.com/keep-network/tbtc-v2/issues/594 + THRESHOLD_COUNCIL_ON_POLYGON: "0x9F6e831c8F8939DC0C830C6e492e7cEf4f9C2F5f" contracts: - InfractionCollector: proxy: + constructor: + initialOwner: $THRESHOLD_COUNCIL_ON_POLYGON # Upgrades owner + _data: $encode:initialize constructor: _coordinator: $COORDINATOR_PROXY diff --git a/scripts/mainnet/deploy_infraction.py b/scripts/mainnet/deploy_infraction.py index 35c5966d..777ab5aa 100644 --- a/scripts/mainnet/deploy_infraction.py +++ b/scripts/mainnet/deploy_infraction.py @@ -3,13 +3,12 @@ from ape import project from deployment.constants import ( - CONSTRUCTOR_PARAMS_DIR, ARTIFACTS_DIR, + CONSTRUCTOR_PARAMS_DIR, ) from deployment.params import Deployer VERIFY = False CONSTRUCTOR_PARAMS_FILEPATH = CONSTRUCTOR_PARAMS_DIR / "mainnet" / "infraction.yml" -TAPIR_REGISTRY = ARTIFACTS_DIR / "mainnet.json" def main():