Skip to content

Commit

Permalink
chore: backport main to v13.0.x (#1599)
Browse files Browse the repository at this point in the history
* chore: add precompile params init (to `main`) (#1544)

chore: add precompile params init

* fix (ci): fix bsr push action (#1547)

fix bsr push action

* fix: remove linux/836 from docker image CI  (#1546)

* fix docker build

* fix lint issues

* add changelog entry

* fix md lint issues

---------

Co-authored-by: tom <[email protected]>
Co-authored-by: Tom <[email protected]>

* build(deps): bump golang from 1.20.3-bullseye to 1.20.4-bullseye (#1550)

Bumps golang from 1.20.3-bullseye to 1.20.4-bullseye.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* docs(readme): improve structure (#1552)

* build(deps): bump bufbuild/buf-setup-action from 1.17.0 to 1.18.0 (#1559)

Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.17.0 to 1.18.0.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](bufbuild/buf-setup-action@v1.17.0...v1.18.0)

---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: MalteHerrmann <[email protected]>

* chore: run make proto-all  (#1551)

Run make proto-all to regenerate .pb.go files

Co-authored-by: Tom <[email protected]>

* chore(evm): fix typo in EVM utils comment (#1560)

* fix typo

* some more typos

---------

Co-authored-by: Federico Kunze Küllmer <[email protected]>

* build(deps): bump bufbuild/buf-setup-action from 1.18.0 to 1.19.0 (#1565)

Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.18.0 to 1.19.0.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](bufbuild/buf-setup-action@v1.18.0...v1.19.0)

---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* deps: bump sdk version to v0.46.11-alpha.ledger.7 (#1567)

* deps: bump sdk version

* add changelog entry

* imp(tests) add commit function to keep ctx settings for tests (#1517)

* add commit function to keep ctx settings for tests

* fix lint issues

* reset gas meter

* rename func

* update based on review comments

---------

Co-authored-by: Federico Kunze Küllmer <[email protected]>

* feat(client): add subcommand debug legacy-eip712 (#1556)

* feat(client): add subcommand debug legacy-eip712

Signed-off-by: Shane <[email protected]>

* refactor(client): use wrap instead of wrapf

* chore(client): add comment

---------

Signed-off-by: Shane <[email protected]>
Co-authored-by: Tom <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>

* chore: update changelog w/ v12.1.3 (#1570)

* deps: bump ibc-go version (#1571)

* chore: update changelog with v12.1.4 (#1576)

update changelog with v12.1.4

* chore(deps): bump ibc-go version to v6.2.0 (#1581)

* build(deps): bump golang from 1.20.4-bullseye to 1.20.5-bullseye (#1584)

Bumps golang from 1.20.4-bullseye to 1.20.5-bullseye.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump bufbuild/buf-setup-action from 1.19.0 to 1.21.0 (#1583)

Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.19.0 to 1.21.0.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](bufbuild/buf-setup-action@v1.19.0...v1.21.0)

---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: MalteHerrmann <[email protected]>

* build(deps): bump @openzeppelin/contracts from 4.8.3 to 4.9.1 in /contracts (#1587)

build(deps): bump @openzeppelin/contracts in /contracts

Bumps [@openzeppelin/contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) from 4.8.3 to 4.9.1.
- [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases)
- [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.1/CHANGELOG.md)
- [Commits](OpenZeppelin/openzeppelin-contracts@v4.8.3...v4.9.1)

---
updated-dependencies:
- dependency-name: "@openzeppelin/contracts"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: MalteHerrmann <[email protected]>
Co-authored-by: Vladislav Varadinov <[email protected]>

* [Snyk] Security upgrade @openzeppelin/contracts from 4.8.3 to 4.9.1 (#1588)

fix: contracts/package.json & contracts/package-lock.json to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-OPENZEPPELINCONTRACTS-5672116

Co-authored-by: Vladislav Varadinov <[email protected]>

* build(deps): bump golangci/golangci-lint-action from 3.4.0 to 3.5.0 (#1582)

* build(deps): bump golangci/golangci-lint-action from 3.4.0 to 3.5.0

Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](golangci/golangci-lint-action@v3.4.0...v3.5.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* remove depguard linter

* address nakedret linter

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: MalteHerrmann <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>

* chore: add ics20 precompile (#1578)

* chore: add ics20 precompile

* update dependencies

* go mod tidy

* Update x/evm/keeper/precompiles.go

Co-authored-by: Federico Kunze Küllmer <[email protected]>

* fix: update go.mod and params comments

* CHANGELOG

---------

Co-authored-by: Vladislav Varadinov <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>

* Update Makefile. enable CGO (#1590)

Update Makefile

* Update cometbft & goleveldb (#1595)

* update cometbft & goleveldb

* fix: run go mod tidy

---------

Co-authored-by: Vladislav Varadinov <[email protected]>

* fix: add MsgCreateClawbackVestingAccount period validation (#1596)

* fix: add MsgCreateClawbackVestingAccount period validation

* add correct err message

---------

Co-authored-by: Vladislav <[email protected]>

* fix: update geth fork (#1597)

* fix: update geth fork

* CHANGELOG

* fix: go.sum

* CHANGELOG

* CHANGELOG

* CHANGELOG

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Shane <[email protected]>
Co-authored-by: Tom <[email protected]>
Co-authored-by: MalteHerrmann <[email protected]>
Co-authored-by: Freddy Caceres <[email protected]>
Co-authored-by: tom <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Burckhardt <[email protected]>
Co-authored-by: Austin Chandra <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>
Co-authored-by: Shane <[email protected]>
Co-authored-by: Snyk bot <[email protected]>
Co-authored-by: MalteHerrmann <[email protected]>
Co-authored-by: Vingurzhou <[email protected]>
  • Loading branch information
13 people authored Jun 13, 2023
1 parent 97a53e1 commit 7502fb6
Show file tree
Hide file tree
Showing 76 changed files with 1,463 additions and 1,197 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/bsr-push.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
name: Push to Buf Schema Registry
# This workflow runs when changes to proto files are pushed to main
# and then pushes these changes on to the Buf Schema Registry at
# https://buf.build/evmos/evmos
# This workflow runs when a new version tag is pushed to the repository.
# It then pushes the Protobuf files corresponding to that tag on to the
# Buf Schema Registry at https://buf.build/evmos/evmos
on:
push:
tags:
- "v*.*.*"
paths:
- "proto/**"

jobs:
push:
runs-on: ubuntu-latest
env:
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1.17.0
- uses: bufbuild/buf-setup-action@v1.21.0
# Push Evmos protos to the Buf Schema Registry
- uses: bufbuild/[email protected]
with:
buf_token: ${{ secrets.BUF_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
name: Get Github tag
id: meta
run: |
echo "::set-output name=tag::$(git describe --always --tags --match='v*')"
echo "tag=$(git describe --always --tags --match='v*')" >> $GITHUB_OUTPUT
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -39,5 +39,5 @@ jobs:
with:
context: .
push: true
platforms: linux/amd64, linux/386, linux/arm64
platforms: linux/amd64, linux/arm64
tags: tharsishq/evmos:latest, tharsishq/evmos:${{ steps.meta.outputs.tag }}
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
**/**.go
go.mod
go.sum
- uses: golangci/golangci-lint-action@v3.4.0
- uses: golangci/golangci-lint-action@v3.5.0
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1.17.0
- uses: bufbuild/buf-setup-action@v1.21.0
- uses: bufbuild/buf-lint-action@v1
with:
input: "proto"
Expand All @@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1.17.0
- uses: bufbuild/buf-setup-action@v1.21.0
- uses: bufbuild/buf-breaking-action@v1
with:
input: "proto"
Expand Down
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ run:

linters:
enable:
- depguard
- dogsled
- dupl
- errcheck
Expand Down
31 changes: 30 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,54 @@ Types of changes (Stanzas):
Ref: https://keepachangelog.com/en/1.0.0/
-->



# Changelog

## [v13.0.0-rc1] - 2023-04-24
## [v13.0.0-rc2] - 2023-06-13

### State Machine Breaking

- (backport) [#1599](https://github.com/evmos/evmos/pull/1599) Backport changes from `main` to `v13.0.x`
- (vesting) [#1596](https://github.com/evmos/evmos/pull/1596) Add MsgCreateClawbackVestingAccount period validation
- (evm) [#1535](https://github.com/evmos/evmos/pull/1535) Add EVM extensions support

### Improvements

- (deps) [#1597](https://github.com/evmos/evmos/pull/1597) Bump geth fork
- (deps) [#1595](https://github.com/evmos/evmos/pull/1595) Bump cometbft and goleveldb
- (evm) [#1578](https://github.com/evmos/evmos/pull/1578#) Add support of ICS20 transfer extension
- (test) [#1486](https://github.com/evmos/evmos/pull/1486) Add benchmark tests for `DeductFeeDecorator` and `EthGasConsumeDecorator` ante handler decorators
- (deps) [#1488](https://github.com/evmos/evmos/pull/1488) Bump btcd version to [`v0.23.3`](https://github.com/btcsuite/btcd/releases/tag/v0.23.3)
- (deps) [#1492](https://github.com/evmos/evmos/pull/1492) Bump Cosmos SDK version to [`v0.46.11-alpha.ledger`](https://github.com/evmos/cosmos-sdk/releases/tag/v0.46.11-alpha.ledger) & use cometbft [`v0.34.27`](https://github.com/cometbft/cometbft/releases/tag/v0.34.27) replacement for Tendermint import

### Bug Fixes

- (deps) [#1567](https://github.com/evmos/evmos/pull/1567) Bump cosmos-sdk version to `v0.46.11-alpha.ledger.7`.
Fix memory leak in `cosmos/iavl` package.

## [v12.1.4] - 2023-05-26

### Improvements

- (deps) [#1571](https://github.com/evmos/evmos/pull/1571) Bump IBC-go version to [`v6.1.1`](https://github.com/cosmos/ibc-go/releases/tag/v6.1.1)

### Bug Fixes

- (ci) [#1546](https://github.com/evmos/evmos/pull/1546) Fix docker image push on release action
- (ci) [#1475](https://github.com/evmos/evmos/pull/1475) Fix version of GitHub action to push to the [Buf Schema Registry](https://buf.build/evmos/evmos) upon releases

## [v12.1.3] - 2023-05-24

### Improvements

- (cli) [#1556](https://github.com/evmos/evmos/pull/1556) Add CLI subcommand to debug legacy EIP712 transaction data

### Bug Fixes

- (deps) [#1566](https://github.com/evmos/evmos/pull/1566) Bump cosmos-sdk version to `v0.46.10-ledger.3`.
Fix memory leak in `cosmos/iavl` package.

## [v12.1.2] - 2023-04-14

### Bug Fixes
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM golang:1.20.3-bullseye AS build-env
FROM golang:1.20.5-bullseye AS build-env

WORKDIR /go/src/github.com/evmos/evmos

COPY . .

RUN make build

FROM golang:1.20.3-bullseye
FROM golang:1.20.5-bullseye

RUN apt-get update \
&& apt-get install ca-certificates jq=1.6-2.1 -y --no-install-recommends
Expand Down
9 changes: 5 additions & 4 deletions LICENSE_FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,9 @@ code under an open source license.
**A:** No, unless you have obtained a commercial permit for the ENCL code or can
ensure compliance with the limitations in ENCL-1.0.

**Q: If I modify the source code of software licensed under the ENCL-1.0, can
I redistribute my modified version under an Open Source license, e.g. MIT or Apache 2.0?**

**Q: If I modify the source code of software licensed under the ENCL-1.0,
can I redistribute my modified version under an Open Source license, e.g. MIT or Apache 2.0?**

**A:** No. Your modified version consists of the original software (which is
under the ENCL-1.0) and your modifications, which together constitute a
Expand All @@ -167,8 +168,8 @@ permissive licenses allow that.
the software that’s being developed, and you do not make commercial use of the
ENCL code in violation of the conditions of the license.

**Q: I have written a code patch to an ENCL-1.0 project and would like the
ENCL-1.0 vendor to maintain the code as part of the ENCL-1.0 project. How do I contribute it?**
**Q: I have written a code patch to an ENCL-1.0 project and would like the ENCL-1.0 vendor
to maintain the code as part of the ENCL-1.0 project. How do I contribute it?**

**A:** First, a big thank you! You can contribute the code to the official Evmos
repository by following the contributing guidelines a nd the official Code of
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ build-linux:
GOOS=linux GOARCH=amd64 LEDGER_ENABLED=false $(MAKE) build

$(BUILD_TARGETS): go.sum $(BUILDDIR)/
go $@ $(BUILD_FLAGS) $(BUILD_ARGS) ./...
CGO_ENABLED="1" go $@ $(BUILD_FLAGS) $(BUILD_ARGS) ./...

$(BUILDDIR)/:
mkdir -p $(BUILDDIR)/
Expand Down
40 changes: 19 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,17 @@ that is fully compatible and interoperable with Ethereum.
It's built using the [Cosmos SDK](https://github.com/cosmos/cosmos-sdk/)
which runs on top of the [Tendermint Core](https://github.com/tendermint/tendermint) consensus engine.

## Quick Start

To learn how Evmos works from a high-level perspective,
go to the [Protocol Overview](https://docs.evmos.org/protocol) section of the documentation.
You can also check the instructions to [Run a Node](https://docs.evmos.org/protocol/evmos-cli#run-an-evmos-node).

## Documentation

Our documentation is hosted in a [separate repository](https://github.com/evmos/docs) and can be found at [docs.evmos.org](https://docs.evmos.org).
Head over there and check it out.

**Note**: Requires [Go 1.20+](https://golang.org/dl/)

## Installation

For prerequisites and detailed build instructions
Expand All @@ -63,12 +67,6 @@ make install

Or check out the latest [release](https://github.com/evmos/evmos/releases).

## Quick Start

To learn how Evmos works from a high-level perspective,
go to the [Protocol Overview](https://docs.evmos.org/protocol) section of the documentation.
You can also check the instructions to [Run a Node](https://docs.evmos.org/protocol/evmos-cli#run-an-evmos-node).

## Community

The following chat channels and forums are great spots to ask questions about Evmos:
Expand All @@ -77,6 +75,18 @@ The following chat channels and forums are great spots to ask questions about Ev
- [Evmos Discord](https://discord.gg/evmos)
- [Evmos Forum](https://commonwealth.im/evmos)

## Contributing

Looking for a good place to start contributing?
Check out some
[`good first issues`](https://github.com/evmos/evmos/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22).

For additional instructions, standards and style guides, please refer to the [Contributing](./CONTRIBUTING.md) document.

## Careers

See our open positions on [Greenhouse](https://boards.eu.greenhouse.io/evmos).

## Licensing

Starting from April 21st, 2023, the Evmos repository will update its License
Expand All @@ -95,7 +105,7 @@ repository. For more information see LICENSE.

### SPDX Identifier

The following header including a license identifier in SPDX short form has been added in all ENCL-1.0 files:
The following header including a license identifier in SPDX short form has been added to all ENCL-1.0 files:

```go
// Copyright Tharsis Labs Ltd.(Evmos)
Expand All @@ -117,15 +127,3 @@ For more information, check out the full ENCL-1.0 FAQ [here](/LICENSE_FAQ.md).
| Permissions | Prohibited |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| - Private Use, including distribution and modification<br />- Commercial use on designated blockchains<br />- Commercial use with Evmos permit (to be separately negotiated) | - Commercial use, other than on designated blockchains, without Evmos permit |

## Contributing

Looking for a good place to start contributing?
Check out some
[`good first issues`](https://github.com/evmos/evmos/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22).

For additional instructions, standards and style guides, please refer to the [Contributing](./CONTRIBUTING.md) document.

## Careers

See our open positions on [Greenhouse](https://boards.eu.greenhouse.io/evmos).
6 changes: 3 additions & 3 deletions app/ante/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var _ = Describe("when sending a Cosmos transaction", func() {
)

var err error
s.ctx, err = testutil.Commit(s.ctx, s.app, time.Second*0, nil)
s.ctx, err = testutil.CommitAndCreateNewCtx(s.ctx, s.app, time.Second*0, nil)
Expect(err).To(BeNil())
})

Expand Down Expand Up @@ -78,7 +78,7 @@ var _ = Describe("when sending a Cosmos transaction", func() {
)

var err error
s.ctx, err = testutil.Commit(s.ctx, s.app, time.Second*0, nil)
s.ctx, err = testutil.CommitAndCreateNewCtx(s.ctx, s.app, time.Second*0, nil)
Expect(err).To(BeNil())
})

Expand Down Expand Up @@ -114,7 +114,7 @@ var _ = Describe("when sending a Cosmos transaction", func() {
s.T(), s.ctx, s.app, addr, balance, rewardsAmt,
)
var err error
s.ctx, err = testutil.Commit(s.ctx, s.app, time.Second*0, nil)
s.ctx, err = testutil.CommitAndCreateNewCtx(s.ctx, s.app, time.Second*0, nil)
Expect(err).To(BeNil())
})

Expand Down
51 changes: 51 additions & 0 deletions client/debug/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ package debug

import (
"encoding/hex"
"encoding/json"
"fmt"
"strconv"
"strings"

authclient "github.com/cosmos/cosmos-sdk/x/auth/client"
"github.com/evmos/evmos/v13/ethereum/eip712"
evmos "github.com/evmos/evmos/v13/types"
"github.com/pkg/errors"

"github.com/spf13/cobra"
"github.com/tendermint/tendermint/libs/bytes"

Expand All @@ -30,6 +36,7 @@ func Cmd() *cobra.Command {
cmd.AddCommand(PubkeyCmd())
cmd.AddCommand(AddrCmd())
cmd.AddCommand(RawBytesCmd())
cmd.AddCommand(LegacyEIP712Cmd())

return cmd
}
Expand Down Expand Up @@ -127,3 +134,47 @@ func RawBytesCmd() *cobra.Command {
},
}
}

// LegacyEIP712Cmd outputs types of legacy EIP712 typed data
func LegacyEIP712Cmd() *cobra.Command {
return &cobra.Command{
Use: "legacy-eip712 [file]",
Short: "Output types of legacy eip712 typed data according to the given transaction",
Example: fmt.Sprintf(`$ %s debug legacy-eip712 tx.json --chain-id evmosd_9000-1`, version.AppName),
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientTxContext(cmd)
if err != nil {
return err
}

stdTx, err := authclient.ReadTxFromFile(clientCtx, args[0])
if err != nil {
return errors.Wrap(err, "read tx from file")
}

txBytes, err := clientCtx.TxConfig.TxJSONEncoder()(stdTx)
if err != nil {
return errors.Wrap(err, "encode tx")
}

chainID, err := evmos.ParseChainID(clientCtx.ChainID)
if err != nil {
return errors.Wrap(err, "invalid chain ID passed as argument")
}

td, err := eip712.LegacyWrapTxToTypedData(clientCtx.Codec, chainID.Uint64(), stdTx.GetMsgs()[0], txBytes, nil)
if err != nil {
return errors.Wrap(err, "wrap tx to typed data")
}

bz, err := json.Marshal(td.Map()["types"])
if err != nil {
return err
}

fmt.Println(string(bz))
return nil
},
}
}
6 changes: 3 additions & 3 deletions contracts/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"doc": "docs"
},
"dependencies": {
"@openzeppelin/contracts": "^4.8.3"
"@openzeppelin/contracts": "^4.9.1"
},
"devDependencies": {},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions crypto/ethsecp256k1/keys.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7502fb6

Please sign in to comment.