From f7ba5f4b839aa7f7ec3fc5e1be94bd17aaad649a Mon Sep 17 00:00:00 2001 From: Ahmad Kaouk Date: Thu, 23 May 2024 14:53:41 +0200 Subject: [PATCH] fix tests --- test/contracts/src/dancun/ProxySuicide.sol | 11 +++-------- .../dev/moonbase/test-contract/test-eip-6780.ts | 8 +++----- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/test/contracts/src/dancun/ProxySuicide.sol b/test/contracts/src/dancun/ProxySuicide.sol index d03d60c6df..27dbd6f14a 100644 --- a/test/contracts/src/dancun/ProxySuicide.sol +++ b/test/contracts/src/dancun/ProxySuicide.sol @@ -5,8 +5,8 @@ contract ProxyDeployer { event ContractDestroyed(address destroyedAddress); // Function to deploy a new Suicide contract - function deployAndDestroy(address target, uint256 entries) public { - Suicide newContract = new Suicide(entries); + function deployAndDestroy(address target) public { + Suicide newContract = new Suicide(); newContract.destroy(target); emit ContractDestroyed(address(newContract)); } @@ -14,12 +14,7 @@ contract ProxyDeployer { } contract Suicide { - mapping(uint256 => uint256) public map; - - constructor(uint256 entries) payable { - for(uint i = 0; i < entries; i++) { - map[i] = i; - } + constructor() payable { } function destroy(address target) public { diff --git a/test/suites/dev/moonbase/test-contract/test-eip-6780.ts b/test/suites/dev/moonbase/test-contract/test-eip-6780.ts index 95d58b40fa..041c0cd952 100644 --- a/test/suites/dev/moonbase/test-contract/test-eip-6780.ts +++ b/test/suites/dev/moonbase/test-contract/test-eip-6780.ts @@ -1,4 +1,4 @@ -import { beforeAll, describeSuite, expect, fetchCompiledContract } from "@moonwall/cli"; +import { beforeEach, describeSuite, expect, fetchCompiledContract } from "@moonwall/cli"; import { expectEVMResult, expectSubstrateEvent } from "../../../../helpers"; import { GLMR, BALTATHAR_ADDRESS } from "@moonwall/util"; import { decodeEventLog } from "viem"; @@ -10,10 +10,9 @@ describeSuite({ testCases: ({ context, it }) => { let contract: `0x${string}`; - beforeAll(async function () { + beforeEach(async function () { const { contractAddress } = await context.deployContract!("Suicide", { gas: 45_000_000n, - args: [1000], }); contract = contractAddress; }); @@ -114,8 +113,7 @@ describeSuite({ contractAddress, functionName: "deployAndDestroy", rawTxOnly: true, - gas: "estimate", - args: [BALTATHAR_ADDRESS, 1000], + args: [BALTATHAR_ADDRESS], }) );