From cfd07489fd8d18d737f36ece5c9d319f5e939b99 Mon Sep 17 00:00:00 2001 From: James Campbell Date: Wed, 31 Jul 2024 13:54:03 +0200 Subject: [PATCH] Move coordinator and taco application to contstructor --- contracts/contracts/coordination/InfractionCollector.sol | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/contracts/contracts/coordination/InfractionCollector.sol b/contracts/contracts/coordination/InfractionCollector.sol index 90834e03..1a4f312f 100644 --- a/contracts/contracts/coordination/InfractionCollector.sol +++ b/contracts/contracts/coordination/InfractionCollector.sol @@ -7,10 +7,10 @@ import "./Coordinator.sol"; import "../../threshold/ITACoChildApplication.sol"; contract InfractionCollector is OwnableUpgradeable { - Coordinator public coordinator; + Coordinator public immutable coordinator; // Reference to the TACoChildApplication contract - ITACoChildApplication public tacoChildApplication; + ITACoChildApplication public immutable tacoChildApplication; // infraction types enum InfractionType { @@ -20,11 +20,10 @@ contract InfractionCollector is OwnableUpgradeable { // Mapping to keep track of reported infractions mapping(uint32 => mapping(address => mapping(InfractionType => bool))) public infractions; - function initialize( + constructor( Coordinator _coordinator, ITACoChildApplication _tacoChildApplication - ) public initializer { - __Ownable_init(msg.sender); + ) { coordinator = _coordinator; tacoChildApplication = _tacoChildApplication; }