Skip to content

Commit

Permalink
fix integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Dec 17, 2024
1 parent 7066edc commit 6e43673
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/integration_tests/hardhat/contracts/TestERC20A.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
8 changes: 5 additions & 3 deletions tests/integration_tests/test_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 6e43673

Please sign in to comment.