From 2bd828b82a0d376c04bb0eb6bd7330aebc9cb168 Mon Sep 17 00:00:00 2001 From: "antonio@fulminlabs.org" Date: Wed, 12 Jul 2023 13:29:11 +0200 Subject: [PATCH] removing FloodPlainTestShared --- script/DecoderWithRegistry.s.sol | 2 +- .../decoders/DecoderWithRegistryScript.t.sol | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/script/DecoderWithRegistry.s.sol b/script/DecoderWithRegistry.s.sol index 10baebf..497bdbd 100644 --- a/script/DecoderWithRegistry.s.sol +++ b/script/DecoderWithRegistry.s.sol @@ -8,7 +8,7 @@ contract DecoderWithRegistryScript is Script { event Duplicated(uint256, address); - function run() public { + function run() public virtual { vm.broadcast(); DecoderWithRegistry decoder = new DecoderWithRegistry(); console.log("Deployed DecoderWithRegistry at", address(decoder)); diff --git a/test/flood-plain/decoders/DecoderWithRegistryScript.t.sol b/test/flood-plain/decoders/DecoderWithRegistryScript.t.sol index 64c7dfb..02ae097 100644 --- a/test/flood-plain/decoders/DecoderWithRegistryScript.t.sol +++ b/test/flood-plain/decoders/DecoderWithRegistryScript.t.sol @@ -2,22 +2,33 @@ pragma solidity 0.8.17; import {DecoderWithRegistryScript} from "script/DecoderWithRegistry.s.sol"; -import {Test} from "forge-std/Test.sol"; +import "forge-std/Test.sol"; import {DecoderWithRegistry} from "src/decoders/extensions/DecoderWithRegistry.sol"; -import {FloodPlainTestShared, IFloodPlain} from "../utils/FloodPlainTestShared.sol"; +import {MockZone} from "../utils/MockZone.sol"; +import {MockERC20} from "../utils/MockERC20.sol"; +import {MockFulfiller} from "../utils/MockFulfiller.sol"; + struct IdToAddress { uint256 id; address addr; } -contract DecoderWithRegistryScriptTest is FloodPlainTestShared, DecoderWithRegistryScript { +contract DecoderWithRegistryScriptTest is DecoderWithRegistryScript { DecoderWithRegistry registryDecoder; - + function setUp() public override { super.setUp(); vm.prank(msg.sender); registryDecoder = new DecoderWithRegistry(); + MockZone zone = new MockZone(); + MockFulfiller fulfiller = new MockFulfiller(); + MockERC20 token0 = new MockERC20(); + MockERC20 token1 = new MockERC20(); + } + + function run() public override(DecoderWithRegistryScript) { + super.run(); } function testAddTokens() public {