Skip to content

Commit

Permalink
imp(rpc): Add server implementation (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
MalteHerrmann committed Aug 6, 2024
1 parent d54f04b commit 86889fb
Show file tree
Hide file tree
Showing 18 changed files with 1,845 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .clconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"precompiles",
"proto",
"rpc",
"server",
"staking-precompile",
"tests",
"types"
Expand Down Expand Up @@ -48,4 +49,4 @@
},
"legacy_version": null,
"target_repo": "https://github.com/evmos/os"
}
}
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ linters:
- gosimple
- govet
- ineffassign
# - lll TODO: enable
- misspell
- nakedret
- prealloc
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This changelog was created using the `clu` binary

### Improvements

- (server) [#22](https://github.com/evmos/os/pull/22) Add server implementation.
- (rpc) [#21](https://github.com/evmos/os/pull/21) Add RPC and indexer types.
- (types) [#20](https://github.com/evmos/os/pull/20) Add crypto and encoding packages.
- (types) [#19](https://github.com/evmos/os/pull/19) Add required wallet types for integration.
Expand Down
8 changes: 0 additions & 8 deletions ethereum/eip712/eip712_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ import (
"fmt"
"testing"

// TODO: this import is required for the tests to pass, remove after porting the crypto package
evmoseip712 "github.com/evmos/evmos/v19/ethereum/eip712"

"cosmossdk.io/math"
chainparams "cosmossdk.io/simapp/params"
"github.com/cosmos/cosmos-sdk/client"
Expand Down Expand Up @@ -74,11 +71,6 @@ func (suite *EIP712TestSuite) SetupTest() {

sdk.GetConfig().SetBech32PrefixForAccount(config.Bech32Prefix, "")
eip712.SetEncodingConfig(suite.config)

// TODO: this is required for the tests to pass because the encoding is called from the original
// Evmos repo during one function from the crypto/... package.
// TODO: remove once it's ported to the new repo
evmoseip712.SetEncodingConfig(suite.config)
}

// createTestAddress creates random test addresses for messages
Expand Down
2 changes: 1 addition & 1 deletion rpc/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rpc"
"github.com/ethereum/go-ethereum/signer/core/apitypes"
"github.com/evmos/evmos/v19/server/config"
evmtypes "github.com/evmos/evmos/v19/x/evm/types"
rpctypes "github.com/evmos/os/rpc/types"
"github.com/evmos/os/server/config"
evmostypes "github.com/evmos/os/types"
)

Expand Down
2 changes: 1 addition & 1 deletion rpc/backend/node_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/crypto"

"github.com/evmos/evmos/v19/server/config"
evmtypes "github.com/evmos/evmos/v19/x/evm/types"
"github.com/evmos/os/crypto/ethsecp256k1"
rpctypes "github.com/evmos/os/rpc/types"
"github.com/evmos/os/server/config"
"github.com/evmos/os/testutil"
)

Expand Down
2 changes: 1 addition & 1 deletion rpc/backend/node_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func (suite *BackendTestSuite) TestSetEtherbase() {
// queryClient := suite.backend.queryClient.QueryClient.(*mocks.EVMQueryClient)
// RegisterStatus(client)
// RegisterValidatorAccount(queryClient, suite.acc)
// c := sdk.NewDecCoin(types.AttoEvmos, math.NewIntFromBigInt(big.NewInt(1)))
// c := sdk.NewDecCoin(testutil.ExampleAttoDenom, math.NewIntFromBigInt(big.NewInt(1)))
// suite.backend.cfg.SetMinGasPrices(sdk.DecCoins{c})
// delAddr, _ := suite.backend.GetCoinbase()
// account, _ := suite.backend.clientCtx.AccountRetriever.GetAccount(suite.backend.clientCtx, delAddr)
Expand Down
2 changes: 1 addition & 1 deletion rpc/websockets.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ import (
rpcclient "github.com/cometbft/cometbft/rpc/jsonrpc/client"
tmtypes "github.com/cometbft/cometbft/types"

"github.com/evmos/evmos/v19/server/config"
evmtypes "github.com/evmos/evmos/v19/x/evm/types"
"github.com/evmos/os/rpc/ethereum/pubsub"
rpcfilters "github.com/evmos/os/rpc/namespaces/ethereum/eth/filters"
"github.com/evmos/os/rpc/types"
"github.com/evmos/os/server/config"
)

type WebsocketsServer interface {
Expand Down
Loading

0 comments on commit 86889fb

Please sign in to comment.