Skip to content

Commit

Permalink
Fix bug with removing initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
theref committed Aug 9, 2024
1 parent cfd0748 commit a03fc2c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions contracts/contracts/coordination/InfractionCollector.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ contract InfractionCollector is OwnableUpgradeable {
// Mapping to keep track of reported infractions
mapping(uint32 => mapping(address => mapping(InfractionType => bool))) public infractions;

constructor(
Coordinator _coordinator,
ITACoChildApplication _tacoChildApplication
) {
constructor(Coordinator _coordinator, ITACoChildApplication _tacoChildApplication) {
coordinator = _coordinator;
tacoChildApplication = _tacoChildApplication;
}
Expand Down
2 changes: 2 additions & 0 deletions deployment/constructor_params/lynx/infraction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ artifacts:
constants:
# See deployment/artifacts/lynx.json
COORDINATOR_PROXY: "0xE9e94499bB0f67b9DBD75506ec1735486DE57770"
TACO_CHILD_PROXY: "0x42F30AEc1A36995eEFaf9536Eb62BD751F982D32"

contracts:
- InfractionCollector:
proxy:
constructor:
_coordinator: $COORDINATOR_PROXY
_tacoChildApplication: $TACO_CHILD_PROXY
4 changes: 1 addition & 3 deletions tests/test_infraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,10 @@ def global_allow_list(project, deployer, coordinator):

@pytest.fixture
def infraction_collector(project, deployer, coordinator, application, oz_dependency):
contract = project.InfractionCollector.deploy(sender=deployer)
encoded_initializer_function = contract.initialize.encode_input(coordinator.address, application.address)
contract = project.InfractionCollector.deploy(coordinator.address, application.address, sender=deployer)
proxy = oz_dependency.TransparentUpgradeableProxy.deploy(
contract.address,
deployer,
encoded_initializer_function,
sender=deployer,
)
proxy_contract = project.InfractionCollector.at(proxy.address)
Expand Down

0 comments on commit a03fc2c

Please sign in to comment.