Skip to content

Commit

Permalink
imp(all): Update with latest Evmos main changes (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
MalteHerrmann authored Aug 30, 2024
1 parent b35efda commit d22f510
Show file tree
Hide file tree
Showing 9 changed files with 715 additions and 126 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bsr-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.35.1
- uses: bufbuild/buf-setup-action@v1.39.0
# Push evmOS protos to the Buf Schema Registry
- uses: bufbuild/[email protected]
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
contents: write
steps:
- uses: actions/checkout@v4
- uses: technote-space/[email protected]
Expand All @@ -32,7 +32,7 @@ jobs:
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.35.1
- uses: bufbuild/buf-setup-action@v1.39.0
- uses: bufbuild/buf-lint-action@v1
with:
input: "proto"
Expand All @@ -41,7 +41,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.35.1
- uses: bufbuild/buf-setup-action@v1.39.0
- uses: bufbuild/buf-breaking-action@v1
with:
input: "proto"
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

- (all) [#43](https://github.com/evmos/os/pull/43) Update with latest evmOS main changes (2b7a8e2).
- (tests) [#41](https://github.com/evmos/os/pull/41) Add Solidity and Ledger tests.
- (all) [#37](https://github.com/evmos/os/pull/37) Add EVM, feemarket and precompiles from evmOS.
- (all) [#38](https://github.com/evmos/os/pull/38) Add readme.
Expand Down
17 changes: 7 additions & 10 deletions ante/evm/08_gas_consume_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package evm_test
import (
sdkmath "cosmossdk.io/math"
sdktypes "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
evmante "github.com/evmos/os/ante/evm"
commonfactory "github.com/evmos/os/testutil/integration/common/factory"
Expand Down Expand Up @@ -97,22 +96,20 @@ func (suite *EvmAnteTestSuite) TestConsumeGasAndEmitEvent() {

testCases := []struct {
name string
expectedError error
expectedError string
fees sdktypes.Coins
getSender func() sdktypes.AccAddress
}{
{
name: "success: fees are zero and event emitted",
expectedError: nil,
fees: sdktypes.Coins{},
name: "success: fees are zero and event emitted",
fees: sdktypes.Coins{},
getSender: func() sdktypes.AccAddress {
// Return prefunded sender
return keyring.GetKey(0).AccAddr
},
},
{
name: "success: there are non zero fees, user has sufficient bank balances and event emitted",
expectedError: nil,
name: "success: there are non zero fees, user has sufficient bank balances and event emitted",
fees: sdktypes.Coins{
sdktypes.NewCoin(unitNetwork.GetDenom(), sdktypes.NewInt(1000)),
},
Expand All @@ -123,7 +120,7 @@ func (suite *EvmAnteTestSuite) TestConsumeGasAndEmitEvent() {
},
{
name: "fail: insufficient user balance, event is NOT emitted",
expectedError: sdkerrors.ErrInsufficientFunds,
expectedError: "failed to deduct transaction costs from user balance",
fees: sdktypes.Coins{
sdktypes.NewCoin(unitNetwork.GetDenom(), sdktypes.NewInt(1000)),
},
Expand Down Expand Up @@ -169,9 +166,9 @@ func (suite *EvmAnteTestSuite) TestConsumeGasAndEmitEvent() {
sender,
)

if tc.expectedError != nil {
if tc.expectedError != "" {
suite.Require().Error(err)
suite.Contains(err.Error(), tc.expectedError.Error())
suite.Contains(err.Error(), tc.expectedError)

// Check events are not present
events := unitNetwork.GetContext().EventManager().Events()
Expand Down
38 changes: 19 additions & 19 deletions example_chain/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ require (
cosmossdk.io/math v1.3.0
cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d
cosmossdk.io/tools/rosetta v0.2.1
github.com/cometbft/cometbft v0.37.9
github.com/cometbft/cometbft v0.37.10
github.com/cometbft/cometbft-db v0.12.0
github.com/cosmos/cosmos-sdk v0.47.12
github.com/cosmos/gogoproto v1.4.10
github.com/cosmos/ibc-go/v7 v7.6.0
github.com/cosmos/cosmos-sdk v0.47.13
github.com/cosmos/gogoproto v1.7.0
github.com/cosmos/ibc-go/v7 v7.7.0
github.com/ethereum/go-ethereum v1.11.5
github.com/evmos/os v0.0.0-20240806115830-ab675cc0c776
github.com/spf13/cast v1.6.0
github.com/spf13/cast v1.7.0
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.18.2
github.com/stretchr/testify v1.9.0
Expand Down Expand Up @@ -44,7 +44,7 @@ require (
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
github.com/btcsuite/btcd v0.24.2 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/btcsuite/btcd/btcutil v1.1.5 // indirect
github.com/btcsuite/btcd/btcutil v1.1.6 // indirect
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
Expand Down Expand Up @@ -97,7 +97,7 @@ require (
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/flatbuffers v1.12.1 // indirect
github.com/google/flatbuffers v23.5.26+incompatible // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/orderedcode v0.0.1 // indirect
github.com/google/s2a-go v0.1.7 // indirect
Expand Down Expand Up @@ -152,7 +152,7 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.16.0 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/prometheus/tsdb v0.10.0 // indirect
Expand Down Expand Up @@ -191,20 +191,20 @@ require (
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/oauth2 v0.20.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/term v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.23.0 // indirect
golang.org/x/term v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/api v0.169.0 // indirect
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect
google.golang.org/grpc v1.65.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240604185151-ef581f913117 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect
google.golang.org/grpc v1.66.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
Expand All @@ -222,7 +222,7 @@ replace (
// use cosmos fork of keyring
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
// use Cosmos-SDK fork to enable Ledger functionality
github.com/cosmos/cosmos-sdk => github.com/evmos/cosmos-sdk v0.47.12-evmos.2
github.com/cosmos/cosmos-sdk => github.com/evmos/cosmos-sdk v0.47.13-evmos
// use Evmos geth fork
github.com/ethereum/go-ethereum => github.com/evmos/go-ethereum v1.10.26-evmos-rc4
// Security Advisory https://github.com/advisories/GHSA-h395-qcrw-5vmq
Expand Down
Loading

0 comments on commit d22f510

Please sign in to comment.