Skip to content

Commit

Permalink
Deploy InfractionCollector to tapir
Browse files Browse the repository at this point in the history
  • Loading branch information
theref committed Aug 13, 2024
1 parent c30dc97 commit 4258c3e
Show file tree
Hide file tree
Showing 3 changed files with 279 additions and 1 deletion.
241 changes: 240 additions & 1 deletion deployment/artifacts/tapir.json
Original file line number Diff line number Diff line change
Expand Up @@ -4657,6 +4657,245 @@
"block_number": 5393004,
"deployer": "0x3B42d26E19FF860bC4dEbB920DD8caA53F93c600"
},
"InfractionCollector": {
"address": "0xb6400F55857716A3Ff863e6bE867F01F23C71793",
"abi": [
{
"type": "constructor",
"stateMutability": "nonpayable",
"inputs": [
{
"name": "_coordinator",
"type": "address",
"components": null,
"internal_type": "contract Coordinator"
},
{
"name": "_tacoChildApplication",
"type": "address",
"components": null,
"internal_type": "contract ITACoChildApplication"
}
]
},
{
"type": "error",
"name": "InvalidInitialization",
"inputs": []
},
{
"type": "error",
"name": "NotInitializing",
"inputs": []
},
{
"type": "error",
"name": "OwnableInvalidOwner",
"inputs": [
{
"name": "owner",
"type": "address",
"components": null,
"internal_type": "address"
}
]
},
{
"type": "error",
"name": "OwnableUnauthorizedAccount",
"inputs": [
{
"name": "account",
"type": "address",
"components": null,
"internal_type": "address"
}
]
},
{
"type": "event",
"name": "InfractionReported",
"inputs": [
{
"name": "ritualId",
"type": "uint32",
"components": null,
"internal_type": "uint32",
"indexed": true
},
{
"name": "stakingProvider",
"type": "address",
"components": null,
"internal_type": "address",
"indexed": true
},
{
"name": "infractionType",
"type": "uint8",
"components": null,
"internal_type": "enum InfractionCollector.InfractionType",
"indexed": false
}
],
"anonymous": false
},
{
"type": "event",
"name": "Initialized",
"inputs": [
{
"name": "version",
"type": "uint64",
"components": null,
"internal_type": "uint64",
"indexed": false
}
],
"anonymous": false
},
{
"type": "event",
"name": "OwnershipTransferred",
"inputs": [
{
"name": "previousOwner",
"type": "address",
"components": null,
"internal_type": "address",
"indexed": true
},
{
"name": "newOwner",
"type": "address",
"components": null,
"internal_type": "address",
"indexed": true
}
],
"anonymous": false
},
{
"type": "function",
"name": "coordinator",
"stateMutability": "view",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"components": null,
"internal_type": "contract Coordinator"
}
]
},
{
"type": "function",
"name": "infractions",
"stateMutability": "view",
"inputs": [
{
"name": "ritualId",
"type": "uint32",
"components": null,
"internal_type": "uint32"
},
{
"name": "stakingProvider",
"type": "address",
"components": null,
"internal_type": "address"
},
{
"name": "",
"type": "uint8",
"components": null,
"internal_type": "enum InfractionCollector.InfractionType"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"components": null,
"internal_type": "bool"
}
]
},
{
"type": "function",
"name": "owner",
"stateMutability": "view",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"components": null,
"internal_type": "address"
}
]
},
{
"type": "function",
"name": "renounceOwnership",
"stateMutability": "nonpayable",
"inputs": [],
"outputs": []
},
{
"type": "function",
"name": "reportMissingTranscript",
"stateMutability": "nonpayable",
"inputs": [
{
"name": "ritualId",
"type": "uint32",
"components": null,
"internal_type": "uint32"
},
{
"name": "stakingProviders",
"type": "address[]",
"components": null,
"internal_type": "address[]"
}
],
"outputs": []
},
{
"type": "function",
"name": "tacoChildApplication",
"stateMutability": "view",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"components": null,
"internal_type": "contract ITACoChildApplication"
}
]
},
{
"type": "function",
"name": "transferOwnership",
"stateMutability": "nonpayable",
"inputs": [
{
"name": "newOwner",
"type": "address",
"components": null,
"internal_type": "address"
}
],
"outputs": []
}
],
"tx_hash": "0x7c11685e52dca884556e225541211e3d747da2bd796fb88c75fdeed3910ba488",
"block_number": 10667701,
"deployer": "0x3B42d26E19FF860bC4dEbB920DD8caA53F93c600"
},
"MockPolygonChild": {
"address": "0x970b5f6A299813cA9DC45Be8446929b6513903f9",
"abi": [
Expand Down Expand Up @@ -6235,4 +6474,4 @@
"deployer": "0x3B42d26E19FF860bC4dEbB920DD8caA53F93c600"
}
}
}
}
19 changes: 19 additions & 0 deletions deployment/constructor_params/tapir/infraction.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
deployment:
name: infraction
chain_id: 80002

artifacts:
dir: ./deployment/artifacts/
filename: tapir.json

constants:
# See deployment/artifacts/tapir.json
COORDINATOR_PROXY: "0xE690b6bCC0616Dc5294fF84ff4e00335cA52C388"
TACO_CHILD_PROXY: "0x489287Ed5BdF7a35fEE411FBdCc47331093D0769"

contracts:
- InfractionCollector:
proxy:
constructor:
_coordinator: $COORDINATOR_PROXY
_tacoChildApplication: $TACO_CHILD_PROXY
20 changes: 20 additions & 0 deletions scripts/tapir/deploy_infraction.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/python3

from ape import project

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

VERIFY = False
CONSTRUCTOR_PARAMS_FILEPATH = CONSTRUCTOR_PARAMS_DIR / "tapir" / "infraction.yml"
TAPIR_REGISTRY = ARTIFACTS_DIR / "tapir.json"


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 4258c3e

Please sign in to comment.