From 6e43673aaa508bf1b330cc95534795278ce8f435 Mon Sep 17 00:00:00 2001 From: HuangYi Date: Tue, 17 Dec 2024 16:22:39 +0800 Subject: [PATCH] fix integration test --- tests/integration_tests/hardhat/contracts/TestERC20A.sol | 4 ++-- tests/integration_tests/test_batch.py | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/integration_tests/hardhat/contracts/TestERC20A.sol b/tests/integration_tests/hardhat/contracts/TestERC20A.sol index edb92c4aa8..b0d9e645ed 100644 --- a/tests/integration_tests/hardhat/contracts/TestERC20A.sol +++ b/tests/integration_tests/hardhat/contracts/TestERC20A.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.10; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract TestERC20A is ERC20 { - constructor() public ERC20("TestERC20", "Test") { - _mint(msg.sender, 100000000000000000000000000); + constructor(owner address) public ERC20("TestERC20", "Test") { + _mint(owner, 100000000000000000000000000); } } diff --git a/tests/integration_tests/test_batch.py b/tests/integration_tests/test_batch.py index b43934a5b4..f99c0cab79 100644 --- a/tests/integration_tests/test_batch.py +++ b/tests/integration_tests/test_batch.py @@ -7,13 +7,15 @@ def test_batch_tx(ethermint): "send multiple eth txs in single cosmos tx" w3 = ethermint.w3 cli = ethermint.cosmos_cli() - sender = ADDRS["validator"] + deployer = ADDRS["validator"] + sender = ADDRS["signer1"] recipient = ADDRS["community"] + deploy_nonce = w3.eth.get_transaction_count(deployer) nonce = w3.eth.get_transaction_count(sender) info = json.loads(CONTRACTS["TestERC20A"].read_text()) contract = w3.eth.contract(abi=info["abi"], bytecode=info["bytecode"]) - deploy_tx = contract.constructor().build_transaction( - {"from": sender, "nonce": nonce} + deploy_tx = contract.constructor(sender).build_transaction( + {"from": deployer, "nonce": deploy_nonce} ) contract = w3.eth.contract(address=contract_address(sender, nonce), abi=info["abi"]) transfer_tx1 = contract.functions.transfer(recipient, 1000).build_transaction(