Skip to content

Commit

Permalink
feat: add support for EVM json-rpc request
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonberg1997 committed Apr 27, 2023
1 parent 100d06d commit 093c11d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 14 deletions.
5 changes: 5 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,11 @@ func New(

app.initModules(ctx)

// add eth query router
ethRouter := app.BaseApp.EthQueryRouter()
ethRouter.RegisterConstHandler()
ethRouter.RegisterEthQueryBalanceHandler(app.BankKeeper, bankkeeper.EthQueryBalanceHandlerGen)

return app
}

Expand Down
2 changes: 0 additions & 2 deletions deployment/localup/.env
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@ VALIDATOR_P2P_PORT_START=27750
VALIDATOR_GRPC_PORT_START=9090
VALIDATOR_GRPC_WEB_PORT_START=9190
VALIDATOR_RPC_PORT_START=26750
VALIDATOR_JSONRPC_PORT_START=8545
DATASEED_ADDRESS_PORT_START=28850
DATASEED_P2P_PORT_START=27850
DATASEED_GRPC_PORT_START=9890
DATASEED_GRPC_WEB_PORT_START=9990
DATASEED_RPC_PORT_START=26850
DATASEED_JSONRPC_PORT_START=8565
STOREAGE_PROVIDER_ADDRESS_PORT_START=9033

# BLST
Expand Down
3 changes: 0 additions & 3 deletions deployment/localup/localup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,6 @@ function start() {
--p2p.external-address 127.0.0.1:$((${VALIDATOR_P2P_PORT_START}+${i})) \
--rpc.laddr tcp://0.0.0.0:$((${VALIDATOR_RPC_PORT_START}+${i})) \
--log_format json > ${workspace}/.local/validator${i}/logs/node.log &

# --json-rpc.address 127.0.0.1:$((${VALIDATOR_JSONRPC_PORT_START}+${i}+${i})) \
# --json-rpc.ws-address 127.0.0.1:$((${VALIDATOR_JSONRPC_PORT_START}+${i}+${i}+1)) \
done
}

Expand Down
3 changes: 0 additions & 3 deletions deployment/localup/localup_fullnode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ function start_fullnode() {
--p2p.external-address 127.0.0.1:$((${DATASEED_P2P_PORT_START}+${i})) \
--rpc.laddr tcp://0.0.0.0:$((${DATASEED_RPC_PORT_START}+${i})) \
--log_format json > ${workspace}/.local/dataseed${i}/logs/node.log &

# --json-rpc.address 127.0.0.1:$((${DATASEED_JSONRPC_PORT_START}+${i}+${i})) \
# --json-rpc.ws-address 127.0.0.1:$((${DATASEED_JSONRPC_PORT_START}+${i}+${i}+1)) \
done
}

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ replace (
cosmossdk.io/x/feegrant => github.com/bnb-chain/greenfield-cosmos-sdk/x/feegrant v0.0.0-20230420120548-24ed3abaca8f
cosmossdk.io/x/upgrade => github.com/bnb-chain/greenfield-cosmos-sdk/x/upgrade v0.0.0-20230420120548-24ed3abaca8f
github.com/btcsuite/btcd => github.com/btcsuite/btcd v0.23.0
github.com/cometbft/cometbft => github.com/bnb-chain/greenfield-tendermint v0.0.0-20230407055437-d971cdfb9041
github.com/cometbft/cometbft => github.com/bnb-chain/greenfield-tendermint v0.0.0-20230426135532-2f353c60f767
github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0
github.com/cosmos/cosmos-sdk => github.com/bnb-chain/greenfield-cosmos-sdk v0.0.0-20230420120548-24ed3abaca8f
github.com/cosmos/cosmos-sdk => github.com/bnb-chain/greenfield-cosmos-sdk v0.0.0-20230427054008-7b4ef78ae38e
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsy
github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA=
github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA=
github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c=
github.com/bnb-chain/greenfield-cosmos-sdk v0.0.0-20230420120548-24ed3abaca8f h1:G8Oum97Mr7+xy+tejWIEOsa5fa0io+halaVIoEJt6BI=
github.com/bnb-chain/greenfield-cosmos-sdk v0.0.0-20230420120548-24ed3abaca8f/go.mod h1:JDbVrng0853agVS7gkb2NwZFCeIgmLFUO+ViutUQExQ=
github.com/bnb-chain/greenfield-cosmos-sdk v0.0.0-20230427054008-7b4ef78ae38e h1:VFn+8TjW2jZ/4mFV80j+YjNA3OtoYI2UabJzMLy663A=
github.com/bnb-chain/greenfield-cosmos-sdk v0.0.0-20230427054008-7b4ef78ae38e/go.mod h1:vHHjRdwIxT9QBzIXBCqg0K/cROq6vmbRbdc4joowQFA=
github.com/bnb-chain/greenfield-cosmos-sdk/api v0.0.0-20230420120548-24ed3abaca8f h1:GsKmH+V6FVglblTDuMfW4Akr48ei/UKI3hfGbaL1MGM=
github.com/bnb-chain/greenfield-cosmos-sdk/api v0.0.0-20230420120548-24ed3abaca8f/go.mod h1:rbc4o84RSEvhf09o2+4Qiazsv0snRJLiEZdk17HeIDw=
github.com/bnb-chain/greenfield-cosmos-sdk/log v0.0.0-20230420120548-24ed3abaca8f h1:N/JEOicOYF4h7TwlSC6xH0jNAcGRJ19PwnaVV0PVGLA=
Expand All @@ -187,8 +187,8 @@ github.com/bnb-chain/greenfield-cosmos-sdk/x/feegrant v0.0.0-20230420120548-24ed
github.com/bnb-chain/greenfield-cosmos-sdk/x/feegrant v0.0.0-20230420120548-24ed3abaca8f/go.mod h1:bcBfa2lBbJUCL05zvN6BVF2C0tvANw0OtwQVSSeIKB4=
github.com/bnb-chain/greenfield-cosmos-sdk/x/upgrade v0.0.0-20230420120548-24ed3abaca8f h1:l5kabcxmQkqlBpOgjlNNm/EFYfIT01Svb1VziJKloIE=
github.com/bnb-chain/greenfield-cosmos-sdk/x/upgrade v0.0.0-20230420120548-24ed3abaca8f/go.mod h1:AGS1+n8CFDXaC/HDDW6z3kybGuuffJAKYNppsRwVgnI=
github.com/bnb-chain/greenfield-tendermint v0.0.0-20230407055437-d971cdfb9041 h1:5FYLZuKmUUuexUkaNP+C96yEP1mw63fH0xIE+395/u0=
github.com/bnb-chain/greenfield-tendermint v0.0.0-20230407055437-d971cdfb9041/go.mod h1:9q11eHNRY9FDwFH+4pompzPNGv//Z3VcfvkELaHJPMs=
github.com/bnb-chain/greenfield-tendermint v0.0.0-20230426135532-2f353c60f767 h1:fU0WUQb5xXeZ87OUHMZaT3ARnyC/BYLdDMDwpkW7dLM=
github.com/bnb-chain/greenfield-tendermint v0.0.0-20230426135532-2f353c60f767/go.mod h1:9q11eHNRY9FDwFH+4pompzPNGv//Z3VcfvkELaHJPMs=
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g=
github.com/bradfitz/gomemcache v0.0.0-20170208213004-1952afaa557d/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60=
Expand Down

0 comments on commit 093c11d

Please sign in to comment.