Skip to content

Commit ecd7639

Browse files
GAtom22fedekunzefacs95
authored
tests(filters): add/improve integration tests for JSON-RPC methods (evmos#1480)
* tests(filters) add block hash check on newBlock filter * tests(filters) add getLogs test cases * tests(filters) add eth_newFilter multiple filters test cases * tests(filters) add eth_newFilter and eth_eth_uninstallFilter test case * tests(filters) fix linting errors * tests(filters) fix linting error on imports * tests(filters) add test case: register filter before contract deploy * tests(filters) refactor logs topics assertion * tests(filters) add topics filter test cases * tests(filters) fix linting errors * tests(filters) remove unnecessary package.json file * tests(filters) update based on PR comments * tests(filters) separate getNewBlocks failing test to a separate PR * tests(filters) add retry on send_tx to avoid Timeout error * tests(filters) add logs by topic and block range test case * update gomod2nix * tests(filters) remove test elapsed time log Co-authored-by: Federico Kunze Küllmer <[email protected]> Co-authored-by: Freddy Caceres <[email protected]>
1 parent b59dd75 commit ecd7639

File tree

16 files changed

+1846
-586
lines changed

16 files changed

+1846
-586
lines changed

gomod2nix.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ schema = 3
2020
version = "v1.0.0-beta.7"
2121
hash = "sha256-XblGvIx6Wvvq6wggXjp+KbeJGXoe7AZH7hXEdauCezU="
2222
[mod."cosmossdk.io/math"]
23-
version = "v1.0.0-beta.3"
24-
hash = "sha256-lTQ27ZlL+kWlc+S//sJmyiOwaf9qS+YLv61I4OXi9XE="
23+
version = "v1.0.0-beta.4"
24+
hash = "sha256-UYdq/46EubyjxkldGike8FlwJLWGCB576VB7th285ao="
2525
[mod."filippo.io/edwards25519"]
2626
version = "v1.0.0-rc.1"
2727
hash = "sha256-3DboBqby2ejRU33FG96Z8JF5AJ8HP2rC/v++VyoQ2LQ="

scripts/run-integration-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cd "$(dirname "$0")"
66
export TMPDIR=/tmp
77

88
echo "build test contracts"
9-
cd ../tests/integration_tests/contracts
9+
cd ../tests/integration_tests/hardhat
1010
HUSKY_SKIP_INSTALL=1 npm install
1111
npm run typechain
1212
cd ..

tests/integration_tests/contracts/contracts/TestERC20A.sol

Lines changed: 0 additions & 9 deletions
This file was deleted.
File renamed without changes.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity 0.8.10;
3+
4+
import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
5+
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
6+
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
7+
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
8+
9+
contract Mars is Initializable, ERC20Upgradeable, UUPSUpgradeable, OwnableUpgradeable {
10+
function initialize() public initializer {
11+
__ERC20_init("Mars", "MRS");
12+
__Ownable_init();
13+
_mint(msg.sender, 1000000 * 10 ** decimals());
14+
}
15+
16+
function _authorizeUpgrade(address newImplementation) internal
17+
override
18+
onlyOwner {}
19+
}
20+
21+
contract MarsV2 is Mars {
22+
function version() pure public returns (string memory) {
23+
return "v2";
24+
}
25+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity 0.8.10;
3+
4+
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
5+
6+
contract TestERC20A is ERC20 {
7+
constructor() public ERC20("TestERC20", "Test") {
8+
_mint(msg.sender, 100000000000000000000000000);
9+
}
10+
}

0 commit comments

Comments
 (0)