Skip to content

Commit

Permalink
Merge branch 'main' into releases/v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
k-yang committed Jan 3, 2025
2 parents 479cb05 + 1ae53e4 commit acbf6d7
Show file tree
Hide file tree
Showing 83 changed files with 2,408 additions and 1,037 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ jobs:
run: make test-coverage-integration

- name: "Upload coverage reports to Codecov"
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/proto-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
# timeout-minutes: 5
# steps:
# - uses: actions/checkout@v4
# - uses: bufbuild/buf-setup-action@v1.46.0
# - uses: bufbuild/buf-setup-action@v1.47.2
# - uses: bufbuild/buf-lint-action@v1
# with:
# input: "proto"
Expand All @@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/buf-setup-action@v1.46.0
- uses: bufbuild/buf-setup-action@v1.47.2
with:
github_token: ${{ github.token }}
- uses: bufbuild/buf-breaking-action@v1
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/jod
38 changes: 29 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Nibiru EVM

#### Nibiru EVM | Before Audit 2 [Nov, 2024]
- [#2119](https://github.com/NibiruChain/nibiru/pull/2119) - fix(evm): Guarantee
that gas consumed during any send operation of the "NibiruBankKeeper" depends
only on the "bankkeeper.BaseKeeper"'s gas consumption.
- [#2120](https://github.com/NibiruChain/nibiru/pull/2120) - fix: Use canonical hexadecimal strings for Eip155 address encoding
- [#2122](https://github.com/NibiruChain/nibiru/pull/2122) - test(evm): more bank extension tests and EVM ABCI integration tests to prevent regressions
- [#2124](https://github.com/NibiruChain/nibiru/pull/2124) - refactor(evm):
Remove unnecessary argument in the `VerifyFee` function, which returns the token
payment required based on the effective fee from the tx data. Improve
documentation.
- [#2125](https://github.com/NibiruChain/nibiru/pull/2125) - feat(evm-precompile):Emit EVM events created to reflect the ABCI events that occur outside the EVM to make sure that block explorers and indexers can find indexed ABCI event information.
- [#2129](https://github.com/NibiruChain/nibiru/pull/2129) - fix(evm): issue with infinite recursion in erc20 funtoken contracts
- [#2134](https://github.com/NibiruChain/nibiru/pull/2134) - fix(evm): query of NIBI should use bank state, not the StateDB

#### Nibiru EVM | Before Audit 2 - 2024-12-06

The codebase went through a third-party [Code4rena
Zenith](https://code4rena.com/zenith) Audit, running from 2024-10-07 until
2024-11-01 and including both a primary review period and mitigation/remission
period. This section describes code changes that occured after that audit in
period. This section describes code changes that occurred after that audit in
preparation for a second audit starting in November 2024.

- [#2074](https://github.com/NibiruChain/nibiru/pull/2074) - fix(evm-keeper): better utilize ERC20 metadata during FunToken creation. The bank metadata for a new FunToken mapping ties a connection between the Bank Coin's `DenomUnit` and the ERC20 contract metadata like the name, decimals, and symbol. This change brings parity between EVM wallets, such as MetaMask, and Interchain wallets like Keplr and Leap.
- [#2076](https://github.com/NibiruChain/nibiru/pull/2076) - fix(evm-gas-fees):
Use effective gas price in RefundGas and make sure that units are properly
reflected on all occurences of "base fee" in the codebase. This fixes [#2059](https://github.com/NibiruChain/nibiru/issues/2059)
reflected on all occurrences of "base fee" in the codebase. This fixes [#2059](https://github.com/NibiruChain/nibiru/issues/2059)
and the [related comments from @Unique-Divine and @berndartmueller](https://github.com/NibiruChain/nibiru/issues/2059#issuecomment-2408625724).
- [#2084](https://github.com/NibiruChain/nibiru/pull/2084) - feat(evm-forge): foundry support and template for Nibiru EVM develoment
- [#2084](https://github.com/NibiruChain/nibiru/pull/2084) - feat(evm-forge): foundry support and template for Nibiru EVM development
- [#2086](https://github.com/NibiruChain/nibiru/pull/2086) - fix(evm-precomples):
Fix state consistency in precompile execution by ensuring proper journaling of
state changes in the StateDB. This pull request makes sure that state is
Expand Down Expand Up @@ -106,12 +119,18 @@ about the expected resulting balance for the transfer recipient.
- [#2101](https://github.com/NibiruChain/nibiru/pull/2101) - fix(evm): tx receipt proper marshalling
- [#2105](https://github.com/NibiruChain/nibiru/pull/2105) - test(evm): precompile call with revert
- [#2106](https://github.com/NibiruChain/nibiru/pull/2106) - chore: scheduled basic e2e tests for evm testnet endpoint
- [#2107](https://github.com/NibiruChain/nibiru/pull/2107) -
feat(evm-funtoken-precompile): Implement methods: balance, bankBalance, whoAmI
- [#2107](https://github.com/NibiruChain/nibiru/pull/2107) - feat(evm-funtoken-precompile): Implement methods: balance, bankBalance, whoAmI
- [#2108](https://github.com/NibiruChain/nibiru/pull/2108) - fix(evm): removed deprecated root key from eth_getTransactionReceipt
- [#2110](https://github.com/NibiruChain/nibiru/pull/2110) - fix(evm): Restore StateDB to its state prior to ApplyEvmMsg call to ensure deterministic gas usage. This fixes an issue where the StateDB pointer field in NibiruBankKeeper was being updated during readonly query endpoints like eth_estimateGas, leading to non-deterministic gas usage in subsequent transactions.
- [#2111](https://github.com/NibiruChain/nibiru/pull/2111) - fix: e2e-evm-cron.yml
- [#2114](https://github.com/NibiruChain/nibiru/pull/2114) - fix(evm): make gas cost zero in conditional bank keeper flow
- [#2116](https://github.com/NibiruChain/nibiru/pull/2116) - fix(precompile-funtoken.go): Fixes a bug where the err != nil check is missing in the bankBalance precompile method
- [#2117](https://github.com/NibiruChain/nibiru/pull/2117) - fix(oracle): The
timestamps resulting from ctx.WithBlock* don't actually correspond to the block
header information from specified blocks in the chain's history, so the oracle
exchange rates need a way to correctly retrieve this information. This change
fixes that discrepancy, giving the expected block timestamp for the EVM's oracle
precompiled contract. The change also simplifies and corrects the code in x/oracle.

#### Nibiru EVM | Before Audit 1 - 2024-10-18

Expand Down Expand Up @@ -237,11 +256,11 @@ feat(evm-funtoken-precompile): Implement methods: balance, bankBalance, whoAmI
- Bump `github.com/grpc-ecosystem/grpc-gateway/v2` from 2.18.1 to 2.19.1 ([#1767](https://github.com/NibiruChain/nibiru/pull/1767), [#1782](https://github.com/NibiruChain/nibiru/pull/1782))
- Bump `robinraju/release-downloader` from 1.8 to 1.11 ([#1783](https://github.com/NibiruChain/nibiru/pull/1783), [#1839](https://github.com/NibiruChain/nibiru/pull/1839), [#1948](https://github.com/NibiruChain/nibiru/pull/1948))
- Bump `github.com/prometheus/client_golang` from 1.17.0 to 1.18.0 ([#1750](https://github.com/NibiruChain/nibiru/pull/1750))
- Bump `golang.org/x/crypto` from 0.15.0 to 0.17.0 ([#1724](https://github.com/NibiruChain/nibiru/pull/1724), [#1843](https://github.com/NibiruChain/nibiru/pull/1843))
- Bump `golang.org/x/crypto` from 0.15.0 to 0.31.0 ([#1724](https://github.com/NibiruChain/nibiru/pull/1724), [#1843](https://github.com/NibiruChain/nibiru/pull/1843), [#2123](https://github.com/NibiruChain/nibiru/pull/2123))
- Bump `github.com/holiman/uint256` from 1.2.3 to 1.2.4 ([#1730](https://github.com/NibiruChain/nibiru/pull/1730))
- Bump `github.com/dvsekhvalnov/jose2go` from 1.5.0 to 1.6.0 ([#1733](https://github.com/NibiruChain/nibiru/pull/1733))
- Bump `github.com/spf13/cast` from 1.5.1 to 1.6.0 ([#1689](https://github.com/NibiruChain/nibiru/pull/1689))
- Bump `cosmossdk.io/math` from 1.1.2 to 1.2.0 ([#1676](https://github.com/NibiruChain/nibiru/pull/1676))
- Bump `cosmossdk.io/math` from 1.1.2 to 1.4.0 ([#1676](https://github.com/NibiruChain/nibiru/pull/1676), [#2115](https://github.com/NibiruChain/nibiru/pull/2115))
- Bump `github.com/grpc-ecosystem/grpc-gateway/v2` from 2.18.0 to 2.18.1 ([#1675](https://github.com/NibiruChain/nibiru/pull/1675))
- Bump `actions/setup-go` from 4 to 5 ([#1696](https://github.com/NibiruChain/nibiru/pull/1696))
- Bump `golang` from 1.19 to 1.21 ([#1698](https://github.com/NibiruChain/nibiru/pull/1698))
Expand All @@ -253,10 +272,11 @@ feat(evm-funtoken-precompile): Implement methods: balance, bankBalance, whoAmI
- Bump `github.com/hashicorp/go-getter` from 1.7.1 to 1.7.5 ([#1858](https://github.com/NibiruChain/nibiru/pull/1858), [#1938](https://github.com/NibiruChain/nibiru/pull/1938))
- Bump `github.com/btcsuite/btcd` from 0.23.3 to 0.24.2 ([#1862](https://github.com/NibiruChain/nibiru/pull/1862), [#2070](https://github.com/NibiruChain/nibiru/pull/2070))
- Bump `pozetroninc/github-action-get-latest-release` from 0.7.0 to 0.8.0 ([#1863](https://github.com/NibiruChain/nibiru/pull/1863))
- Bump `bufbuild/buf-setup-action` from 1.30.1 to 1.46.0 ([#1891](https://github.com/NibiruChain/nibiru/pull/1891), [#1900](https://github.com/NibiruChain/nibiru/pull/1900), [#1923](https://github.com/NibiruChain/nibiru/pull/1923), [#1972](https://github.com/NibiruChain/nibiru/pull/1972), [#1974](https://github.com/NibiruChain/nibiru/pull/1974), [#1988](https://github.com/NibiruChain/nibiru/pull/1988), [#2043](https://github.com/NibiruChain/nibiru/pull/2043), [#2057](https://github.com/NibiruChain/nibiru/pull/2057), [#2062](https://github.com/NibiruChain/nibiru/pull/2062), [#2069](https://github.com/NibiruChain/nibiru/pull/2069), [#2102](https://github.com/NibiruChain/nibiru/pull/2102))
- Bump `bufbuild/buf-setup-action` from 1.30.1 to 1.47.2 ([#1891](https://github.com/NibiruChain/nibiru/pull/1891), [#1900](https://github.com/NibiruChain/nibiru/pull/1900), [#1923](https://github.com/NibiruChain/nibiru/pull/1923), [#1972](https://github.com/NibiruChain/nibiru/pull/1972), [#1974](https://github.com/NibiruChain/nibiru/pull/1974), [#1988](https://github.com/NibiruChain/nibiru/pull/1988), [#2043](https://github.com/NibiruChain/nibiru/pull/2043), [#2057](https://github.com/NibiruChain/nibiru/pull/2057), [#2062](https://github.com/NibiruChain/nibiru/pull/2062), [#2069](https://github.com/NibiruChain/nibiru/pull/2069), [#2102](https://github.com/NibiruChain/nibiru/pull/2102), [#2113](https://github.com/NibiruChain/nibiru/pull/2113))
- Bump `axios` from 1.7.3 to 1.7.4 ([#2016](https://github.com/NibiruChain/nibiru/pull/2016))
- Bump `github.com/CosmWasm/wasmvm` from 1.5.0 to 1.5.5 ([#2047](https://github.com/NibiruChain/nibiru/pull/2047))
- Bump `docker/build-push-action` from 5 to 6 ([#1924](https://github.com/NibiruChain/nibiru/pull/1924))
- Bump `codecov/codecov-action` from 4 to 5 ([#2112](https://github.com/NibiruChain/nibiru/pull/2112))

## [v1.5.0](https://github.com/NibiruChain/nibiru/releases/tag/v1.5.0) - 2024-06-21

Expand Down
4 changes: 1 addition & 3 deletions app/ante/commission_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package ante_test

import (
"testing"

"cosmossdk.io/math"
sdkclienttx "github.com/cosmos/cosmos-sdk/client/tx"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -109,7 +107,7 @@ func (s *AnteTestSuite) TestAnteDecoratorStakingCommission() {
wantErr: ante.ErrMaxValidatorCommission.Error(),
},
} {
s.T().Run(tc.name, func(t *testing.T) {
s.Run(tc.name, func() {
txGasCoins := sdk.NewCoins(
sdk.NewCoin("unibi", math.NewInt(1_000)),
sdk.NewCoin("utoken", math.NewInt(500)),
Expand Down
20 changes: 10 additions & 10 deletions app/ante/fixed_gas_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/cosmos/cosmos-sdk/testutil/testdata"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/signing"
"github.com/cosmos/cosmos-sdk/x/bank/types"
bank "github.com/cosmos/cosmos-sdk/x/bank/types"

"github.com/NibiruChain/nibiru/v2/app/ante"
"github.com/NibiruChain/nibiru/v2/app/appconst"
Expand Down Expand Up @@ -62,7 +62,7 @@ func (suite *AnteTestSuite) TestOraclePostPriceTransactionsHaveFixedPrice() {
Feeder: addr.String(),
Validator: addr.String(),
},
&types.MsgSend{
&bank.MsgSend{
FromAddress: addr.String(),
ToAddress: addr.String(),
Amount: sdk.NewCoins(sdk.NewInt64Coin(appconst.BondDenom, 100)),
Expand All @@ -74,7 +74,7 @@ func (suite *AnteTestSuite) TestOraclePostPriceTransactionsHaveFixedPrice() {
{
name: "Two messages in a transaction, one of them is an oracle vote message should fail (with MsgAggregateExchangeRatePrevote) permutation 2",
messages: []sdk.Msg{
&types.MsgSend{
&bank.MsgSend{
FromAddress: addr.String(),
ToAddress: addr.String(),
Amount: sdk.NewCoins(sdk.NewInt64Coin(appconst.BondDenom, 100)),
Expand All @@ -97,7 +97,7 @@ func (suite *AnteTestSuite) TestOraclePostPriceTransactionsHaveFixedPrice() {
Feeder: addr.String(),
Validator: addr.String(),
},
&types.MsgSend{
&bank.MsgSend{
FromAddress: addr.String(),
ToAddress: addr.String(),
Amount: sdk.NewCoins(sdk.NewInt64Coin(appconst.BondDenom, 100)),
Expand All @@ -109,7 +109,7 @@ func (suite *AnteTestSuite) TestOraclePostPriceTransactionsHaveFixedPrice() {
{
name: "Two messages in a transaction, one of them is an oracle vote message should fail (with MsgAggregateExchangeRateVote) permutation 2",
messages: []sdk.Msg{
&types.MsgSend{
&bank.MsgSend{
FromAddress: addr.String(),
ToAddress: addr.String(),
Amount: sdk.NewCoins(sdk.NewInt64Coin(appconst.BondDenom, 100)),
Expand Down Expand Up @@ -169,7 +169,7 @@ func (suite *AnteTestSuite) TestOraclePostPriceTransactionsHaveFixedPrice() {
Feeder: addr.String(),
Validator: addr.String(),
},
&types.MsgSend{
&bank.MsgSend{
FromAddress: addr.String(),
ToAddress: addr.String(),
Amount: sdk.NewCoins(sdk.NewInt64Coin(appconst.BondDenom, 100)),
Expand All @@ -186,25 +186,25 @@ func (suite *AnteTestSuite) TestOraclePostPriceTransactionsHaveFixedPrice() {
{
name: "Other two messages",
messages: []sdk.Msg{
&types.MsgSend{
&bank.MsgSend{
FromAddress: addr.String(),
ToAddress: addr.String(),
Amount: sdk.NewCoins(sdk.NewInt64Coin(appconst.BondDenom, 100)),
},
&types.MsgSend{
&bank.MsgSend{
FromAddress: addr.String(),
ToAddress: addr.String(),
Amount: sdk.NewCoins(sdk.NewInt64Coin(appconst.BondDenom, 200)),
},
},
expectedGas: 67193,
expectedGas: 38175,
expectedErr: nil,
},
}

for _, tc := range tests {
tc := tc
suite.T().Run(tc.name, func(t *testing.T) {
suite.Run(tc.name, func() {
suite.SetupTest() // setup
suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder()

Expand Down
1 change: 0 additions & 1 deletion app/evmante/evmante_gas_consume.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ func (anteDec AnteDecEthGasConsume) AnteHandle(

fees, err := keeper.VerifyFee(
txData,
evm.EVMBankDenom,
baseFeeMicronibiPerGas,
ctx.IsCheckTx(),
)
Expand Down
2 changes: 1 addition & 1 deletion app/evmante/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (s *TestSuite) TestGenesis() {
wantErr: "min_commission must be positive",
},
} {
s.T().Run(tc.name, func(t *testing.T) {
s.Run(tc.name, func() {
genStakingJson := s.encCfg.Codec.MustMarshalJSON(tc.gen)
err := app.StakingModule{}.ValidateGenesis(
s.encCfg.Codec,
Expand Down
2 changes: 1 addition & 1 deletion app/modules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (s *TestSuite) TestGenesis() {
wantErr: "min_commission must be positive",
},
} {
s.T().Run(tc.name, func(t *testing.T) {
s.Run(tc.name, func() {
genStakingJson := s.encCfg.Codec.MustMarshalJSON(tc.gen)
err := app.StakingModule{}.ValidateGenesis(
s.encCfg.Codec,
Expand Down
1 change: 0 additions & 1 deletion app/wasmext/stargate_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ func WasmAcceptedStargateQueries() wasmkeeper.AcceptedStargateQueries {

// nibiru oracle
"/nibiru.oracle.v1.Query/ExchangeRate": new(oracle.QueryExchangeRateResponse),
"/nibiru.oracle.v1.Query/DatedExchangeRate": new(oracle.QueryDatedExchangeRateResponse),
"/nibiru.oracle.v1.Query/ExchangeRateTwap": new(oracle.QueryExchangeRateResponse),
"/nibiru.oracle.v1.Query/ExchangeRates": new(oracle.QueryExchangeRatesResponse),
"/nibiru.oracle.v1.Query/Actives": new(oracle.QueryActivesResponse),
Expand Down
10 changes: 5 additions & 5 deletions contrib/bashlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@ export COLOR_BRIGHT_WHITE="\033[97m"

# log_debug: Simple wrapper for `echo` with a DEBUG prefix.
log_debug() {
echo "${COLOR_CYAN}DEBUG${COLOR_RESET}" "$@"
echo -e "${COLOR_CYAN}DEBUG${COLOR_RESET}" "$@"
}

# log_error: ERROR messages in red, output to stderr.
log_error() {
echo "${COLOR_RED}ERROR:${COLOR_RESET}" "$@" >&2
echo -e "${COLOR_RED}ERROR:${COLOR_RESET}" "$@" >&2
}

log_success() {
echo "${COLOR_GREEN}✅ SUCCESS:${COLOR_RESET}" "$@"
echo -e "${COLOR_GREEN}✅ SUCCESS:${COLOR_RESET}" "$@"
}

# log_warning: WARNING messages represent non-critical issues that might not
# require immediate action but should be noted as points of concern or failure.
log_warning() {
echo "${COLOR_YELLOW}WARNING${COLOR_RESET}" "$@" >&2
echo -e "${COLOR_YELLOW}WARNING${COLOR_RESET}" "$@" >&2
}

log_info() {
echo "${COLOR_MAGENTA}INFO${COLOR_RESET}" "$@"
echo -e "${COLOR_MAGENTA}INFO${COLOR_RESET}" "$@"
}

# —————————————————————————————————————————————————
Expand Down
25 changes: 10 additions & 15 deletions eth/eip55.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package eth

import (
"encoding/json"
"fmt"

sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -36,53 +35,49 @@ func NewEIP55AddrFromStr(input string) (EIP55Addr, error) {
// Marshal implements the gogo proto custom type interface.
// Ref: https://github.com/cosmos/gogoproto/blob/v1.5.0/custom_types.md
func (h EIP55Addr) Marshal() ([]byte, error) {
return h.Bytes(), nil
return []byte(h.Address.Hex()), nil
}

// MarshalJSON returns the [EIP55Addr] as JSON bytes.
// Implements the gogo proto custom type interface.
// Ref: https://github.com/cosmos/gogoproto/blob/v1.5.0/custom_types.md
func (h EIP55Addr) MarshalJSON() ([]byte, error) {
return json.Marshal(h.String())
return []byte(h.String()), nil
}

// MarshalTo serializes a EIP55Addr directly into a pre-allocated byte slice ("data").
// MarshalTo implements the gogo proto custom type interface.
// Implements the gogo proto custom type interface.
// Ref: https://github.com/cosmos/gogoproto/blob/v1.5.0/custom_types.md
func (h *EIP55Addr) MarshalTo(data []byte) (n int, err error) {
copy(data, h.Bytes())
copy(data, []byte(h.Address.Hex()))
return h.Size(), nil

Check warning on line 54 in eth/eip55.go

View check run for this annotation

Codecov / codecov/patch

eth/eip55.go#L52-L54

Added lines #L52 - L54 were not covered by tests
}

// Unmarshal implements the gogo proto custom type interface.
// Ref: https://github.com/cosmos/gogoproto/blob/v1.5.0/custom_types.md
func (h *EIP55Addr) Unmarshal(data []byte) error {
addr := gethcommon.BytesToAddress(data)
*h = EIP55Addr{Address: addr}
addr, err := NewEIP55AddrFromStr(string(data))
if err != nil {
return err
}

Check warning on line 63 in eth/eip55.go

View check run for this annotation

Codecov / codecov/patch

eth/eip55.go#L62-L63

Added lines #L62 - L63 were not covered by tests
*h = addr
return nil
}

// UnmarshalJSON implements the gogo proto custom type interface.
// Ref: https://github.com/cosmos/gogoproto/blob/v1.5.0/custom_types.md
func (h *EIP55Addr) UnmarshalJSON(bz []byte) error {
text := new(string)
if err := json.Unmarshal(bz, text); err != nil {
return err
}

addr, err := NewEIP55AddrFromStr(*text)
addr, err := NewEIP55AddrFromStr(string(bz))
if err != nil {
return err
}

Check warning on line 74 in eth/eip55.go

View check run for this annotation

Codecov / codecov/patch

eth/eip55.go#L73-L74

Added lines #L73 - L74 were not covered by tests

*h = addr

return nil
}

// Size implements the gogo proto custom type interface.
// Ref: https://github.com/cosmos/gogoproto/blob/v1.5.0/custom_types.md
func (h EIP55Addr) Size() int {
return len(h.Bytes())
return len([]byte(h.Address.Hex()))
}
Loading

0 comments on commit acbf6d7

Please sign in to comment.