Skip to content

Commit

Permalink
Merge pull request #314 from theref/deploy-infraction-35
Browse files Browse the repository at this point in the history
InfractionCollector on Mainnet
  • Loading branch information
KPrasch authored Sep 3, 2024
2 parents 2211cd3 + 2c7de44 commit dc5edfe
Show file tree
Hide file tree
Showing 3 changed files with 268 additions and 0 deletions.
225 changes: 225 additions & 0 deletions deployment/artifacts/mainnet-infraction.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
24 changes: 24 additions & 0 deletions deployment/constructor_params/mainnet/infraction.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
deployment:
name: infraction
chain_id: 137

artifacts:
dir: ./deployment/artifacts/
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
19 changes: 19 additions & 0 deletions scripts/mainnet/deploy_infraction.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/python3

from ape import project

from deployment.constants import (
CONSTRUCTOR_PARAMS_DIR,
)
from deployment.params import Deployer

VERIFY = False
CONSTRUCTOR_PARAMS_FILEPATH = CONSTRUCTOR_PARAMS_DIR / "mainnet" / "infraction.yml"


def main():
deployer = Deployer.from_yaml(filepath=CONSTRUCTOR_PARAMS_FILEPATH, verify=VERIFY)
infraction = deployer.deploy(project.InfractionCollector)
deployments = [infraction]
deployer.finalize(deployments=deployments)

0 comments on commit dc5edfe

Please sign in to comment.