Commit Graph

30 Commits

Author SHA1 Message Date
crypto-facs
04f595d3d5
Integration tests (#913) 2022-01-20 22:05:02 +00:00
Prajjwol Gautam
4ec794204c
fix: moving rpc tests to integration_test.go (#875)
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-01-05 08:41:36 +01:00
yihuang
d822fee5c1
fix: contract address in contract creation receipt (#851)
* Problem: contract address in contract creation receipt is wrong

Closes: #850
- decrease nonce before evm.create
- add unit tests and rpc tests

* add changelog
2021-12-28 08:55:40 +01:00
Daniel Burckhardt
2bf2b6758b
fix: RPC tests fail if FeeMarket BaseFee is enabled by default (#770)
* Fix(FeeMarket): Enable FeeMarkat BaseFee

* fix rpc tests

* changelog

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Freddy Caceres <freddy.caceres@crypto.com>
Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.com>
2021-11-23 15:00:25 +00:00
Jongwhan Lee
392d1dd8cf
rpc: eth_feeHistory (#734)
* Problem: missing json rpc of eth_feeHistory #685

add oracle backend

space ready

structure ok

refactoring

return feehistory

data flow ok

basefee

set gas used ratio

computing reward

add testing

add gas used

prepare data

fill reward

increase coin

fixing api

add mac

add launch

gas used ratio ok

print element

reward workes

reward working

fix panic

value correct

remove debugging log

tidy up

tidy up

remove oracle

tidy up

fix handler crash

add unit test

tidy up

add limit check

reformat

fix lint

fix lint

fix lint

fix lint

Update rpc/ethereum/backend/feebackend.go

thanks

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

Update rpc/ethereum/backend/feebackend.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

Update rpc/ethereum/backend/feebackend.go

thanks

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

Update rpc/ethereum/backend/feebackend.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

fix compile error

split lines

remove temporary string conversion

return error if gaslimit is 0

move OneFeeHistory to types

add comment

only err check

Update rpc/ethereum/backend/feebackend.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

Update rpc/ethereum/backend/feebackend.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

tidy up

add feehistory-cap

* Apply suggestions from code review

* changelog

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.com>
2021-11-17 11:58:52 +00:00
Adu
f42f339d05
rpc: personal_listWallets (#748)
* Problem: need to add JSON-RPC endpoint personal_listWallets

Closes #745

* wallet level that manages accounts is not supported by keyring interface, will return nil

* changelog entry

* fix lint failure by exposing RawWallet as public

* fix notes typo
2021-11-15 11:20:59 +00:00
Adu
a874c1e1ca
rpc: personal_initializeWallet (#740)
* Problem: need to add JSON-RPC endpoint personal_initializeWallet

Closes #738

* this is aimed at smartcard wallet which is not supported yet.

* changelog and not skip for expecting error

* fix personal_test error message assertion

* Apply suggestions from code review

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-11-11 15:12:14 +00:00
Adu
a3f1d8d89d
rpc: personal_unpair (#733)
* Problem: need to add rpc endpoint personal_unpair

Closes #730

* this is aimed at smartcard wallet which is not supported yet.

* will return unsupported error now.

* Update rpc/ethereum/namespaces/personal/api.go

* add changelog entry and use errors.Is

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com>
2021-11-10 10:09:53 +01:00
JayT106
08a8191002
rpc: add NoBaseFee check in backend.BaseFee (#697)
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-10-23 17:47:32 +00:00
Jongwhan Lee
f70e4c1253
rpc: eth_resend (#684)
* Problem: missing json rpc for eth_resend #675

add unit test

restore

Update server/start.go

thanks~

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

tidy up checkTxFee

change comments

* fix lint

* Apply suggestions from code review

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-10-20 19:14:39 +00:00
yihuang
1000461a55
rpc: transaction receipt test (#678)
* Problem: No test on the transaction receipt api

Closes: #582

- add receipt rpc test for erc20 transfer logs

* lower gas fee

* build with go 1.17 in CI

* use go 1.17 in test-solidity

* fix merge
2021-10-20 21:00:17 +02:00
JayT106
f69c887276
rpc: test fix (#608)
* fix rpc tests with net namespace

* skip personal test

* skip rpc pending test

* fix endpoint

* fix rpc pending test

* fix missing gas param in some rpc tests

* fix eth_getproof when the block number is equal to pending or latest

* fix rpc tests filter subscribe failed

* lint

* remove unused linter

* fix PendingTransactionFilter and TestEth_GetFilterChanges_BlockFilter

* fix eth_estimateGas

* fix TestEth_EstimateGas_ContractDeployment

* skip TestEth_ExportAccount_WithStorage

* remove sleep in rpc test

* Update changelog

* add test-rpc in github action

* bump golangci-lint version to v1.42.1
2021-10-07 18:41:27 +02:00
Daniel Burckhardt
34c2593e43
rpc: restructure JSON-RPC directory and rename server config (#612)
* Restructure ethermint/rpc repo structure and change import statements

* Add #400 to changelog

* fix filepath in util and json_rpc

* Move #400  to unreleased section
2021-10-01 14:49:22 +00:00
JayT106
b42e187060
evm, rpc: apply bloom filter when querying ethlogs with a range of blocks (#587)
* apply the bloom filter when query the ethlogs with a range of blocks

* fix lint

* error handling in calcBloomIVs

* print error log in createBloomFilters

* update changelog

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-09-27 14:35:37 +00:00
Federico Kunze Küllmer
26c5eabb18
all: linter (#532)
* add additional linters

* fixes

* rm action
2021-09-05 11:03:06 +00:00
Federico Kunze Küllmer
c73ce0f812
all: cleanup imports (#524) 2021-09-03 18:06:36 +00:00
Federico Kunze Küllmer
7389770b10
ci: lint (#500) 2021-08-26 15:45:45 +00:00
Thomas Nguy
52f42b5ff4
rpc: fix get transaction by hash (#428)
* fix get transaction by hash

* add test case
2021-08-11 07:15:11 -04:00
crypto-facs
c4aa8fafab
fix: Extra data empty response (#381) 2021-07-29 13:40:59 -04:00
yihuang
14b38af8bc
rpc, evm: use binary search to estimate gas (#272)
* do binary search to estimate gas

Closes #268

- Also refactor ApplyMessage to be more reuseable

move binary search to rpc api side to have a clean context each try

remove EstimateGas grpc api

* extract BinSearch function and add unit test

* do estimateGas in grpc query

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-07-19 15:19:23 +00:00
Calvin Lau
071ae3f618
rpc: fix eth_getBlockTransactionCountByNumber crash on block not found (#254)
* Fix GetBlockTransactionCountByNumber crashed on block not found

* Fix getTransactionByBlock*

* Update log based on review

* Apply suggestions from code review

* Update ethereum/rpc/namespaces/eth/api.go

* Apply suggestions from code review

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-07-16 10:13:15 +00:00
yihuang
1a48e09e78
rpc: implement eth_getPendingTransactions (#259)
* Implement `eth_getPendingTransactions`

Closes #244

* refactor repeatitive code

* Update ethereum/rpc/namespaces/eth/api.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* Update ethereum/rpc/namespaces/eth/api.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* Update ethereum/rpc/namespaces/eth/api.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* Update ethereum/rpc/namespaces/eth/api.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* test UnwrapEthereumMsg

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-07-12 17:42:53 +00:00
Calvin Lau
8d51a70d6d
rpc: fix GetBlockByHash crash on block not found (#256)
* Fix GetBlockByHash crashed on block not found

* Add and update log message based on review

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-07-12 12:45:13 +00:00
Calvin Lau
8bfb6b0a67
rpc: implement net_listening and net_peerCount JSON-RPC endpoints (#252)
* Add net_listening net_peerCount endpoint

* Add test cases

* Use RPC client from context

* Fix lint issue

* Revert unnecessary changes

* Update JSON RPC documentation
2021-07-12 08:26:33 -04:00
yihuang
8f73d556c6
rpc: fix eth_getTransactionByHash tx in mempool (#261)
Closes #260

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-07-12 10:34:47 +00:00
Federico Kunze
6000ab2098
chore: un-fork from cosmos (#166)
* chore: un-fork from cosmos

* rm LoC
2021-06-22 06:49:18 -04:00
Federico Kunze
bb91d8d93d
ante, evm: fix panic when checking BlockGasMeter (#120)
* ante, evm: fix panic when checking BlockGasMeter

* update block gas limit function
2021-06-14 10:24:08 -04:00
Akash Khosla
e3270aee5d
lint: fix many broken lint issues (#49)
* lint: fix many broken lint issues

* more lint issues resolved

* more lint issues resolved

* all actions issues fixed

* pin variables for websocket

* Update .github/workflows/lint.yml

* more fixes

* fix lint issues in pubsub, rpc, types

* fix lint issues in statedb, journal, pubsub, cli

* fix comment

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2021-06-08 03:07:11 -04:00
Federico Kunze
0805bf80e5
evm: fix EndBlock panic (#51) 2021-05-27 05:26:01 -04:00
Federico Kunze
96cad7de9c
tests: reorganize packages (#7)
* tests: reorganize testing packages

* gitignore and minor changes
2021-05-11 07:54:55 -04:00