Skip to content

Commit

Permalink
Deploy InfractionCollector to mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
theref committed Aug 26, 2024
1 parent 7966ddd commit b6b0b22
Show file tree
Hide file tree
Showing 3 changed files with 234 additions and 3 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"
}
}
}
9 changes: 8 additions & 1 deletion deployment/constructor_params/mainnet/infraction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions scripts/mainnet/deploy_infraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit b6b0b22

Please sign in to comment.