forked from evmos/ethermint
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry pick latest changes (evmos#1265)
* changelog * Add support for miner_setGasPrice API (evmos#1237) * fix kv indexer unit test * fix(rpc): get_proof test fail because block numbers are not high enough (evmos#1239) * Problem: get_proof test fail because block numbers are not high enough Solution: - wait for app block height rather than tendermint block height * Update tests/integration_tests/test_types.py * keep get_proof response the same as geth Co-authored-by: Daniel Burckhardt <[email protected]> * tests(rpc): add filter tests (evmos#1233) * tests(rpc): add pending transaction filter test * tests(rpc): add block filter and event log test * tests(rpc): simplify to cluster instead of comparing types * tests(rpc): wip filter by address * tests(rpc): add get_logs test * fix flake8 linter * fix flake8 linter * add caching to readme * add caching to readme Co-authored-by: Federico Kunze Küllmer <[email protected]> * changelog * update gomod2nix * fix python linter * Apply suggestions from code review * Update CHANGELOG.md Co-authored-by: yihuang <[email protected]> Co-authored-by: Daniel Burckhardt <[email protected]> Co-authored-by: Federico Kunze Küllmer <[email protected]>
- Loading branch information
1 parent
65c94ef
commit 3762738
Showing
14 changed files
with
331 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# RPC Integration tests | ||
|
||
The RPC integration test suite uses nix for reproducible and configurable | ||
builds allowing to run integration tests using python web3 library against | ||
different Ethermint and [Geth](https://github.com/ethereum/go-ethereum) clients with multiple configurations. | ||
|
||
## Installation | ||
|
||
Nix Multi-user installation: | ||
|
||
``` | ||
sh <(curl -L https://nixos.org/nix/install) --daemon | ||
``` | ||
|
||
Make sure the following line has been added to your shell profile (e.g. ~/.profile): | ||
|
||
``` | ||
source ~/.nix-profile/etc/profile.d/nix.sh | ||
``` | ||
|
||
Then re-login shell, the nix installation is completed. | ||
|
||
For linux: | ||
|
||
``` | ||
sh <(curl -L https://nixos.org/nix/install) --no-daemon | ||
``` | ||
|
||
## Run Local | ||
|
||
First time run (can take a while): | ||
|
||
``` | ||
make run-integration-tests | ||
``` | ||
|
||
Once you've run them once and, you can run: | ||
|
||
``` | ||
nix-shell tests/integration_tests/shell.nix | ||
cd tests/integration_tests | ||
pytest -s -vv | ||
``` | ||
|
||
If you're changing anything on the ethermint rpc, rerun the first command. | ||
|
||
|
||
## Caching | ||
|
||
You can enable Binary Cache to speed up the tests: | ||
|
||
``` | ||
$ nix-env -iA cachix -f https://cachix.org/api/v1/install | ||
$ cachix use ethermint | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
pragma solidity >0.5.0; | ||
|
||
contract Greeter { | ||
string public greeting; | ||
|
||
event ChangeGreeting(address from, string value); | ||
|
||
constructor() public { | ||
greeting = "Hello"; | ||
} | ||
|
||
function setGreeting(string memory _greeting) public { | ||
greeting = _greeting; | ||
emit ChangeGreeting(msg.sender, _greeting); | ||
} | ||
|
||
function greet() public view returns (string memory) { | ||
return greeting; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.