From 5beef59ee96d55c40431732e07ce4243ad4902f8 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Sun, 5 Jun 2022 21:13:59 +0800 Subject: [PATCH 1/4] avoid invalid account error on create vesting account * this change is related to https://github.com/cosmos/cosmos-sdk/pull/12154/files * for more info see https://github.com/crypto-org-chain/cronos/issues/471 --- types/account.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/account.go b/types/account.go index abdec11bdb..8e827623d4 100644 --- a/types/account.go +++ b/types/account.go @@ -52,6 +52,10 @@ func ProtoAccount() authtypes.AccountI { } } +func (acc EthAccount) GetBaseAccount() *authtypes.BaseAccount { + return acc.BaseAccount +} + // EthAddress returns the account address ethereum format. func (acc EthAccount) EthAddress() common.Address { return common.BytesToAddress(acc.GetAddress().Bytes()) From 7e29165efb0a81dc760f593a34f80ff6f823e7be Mon Sep 17 00:00:00 2001 From: mmsqe Date: Sun, 5 Jun 2022 22:56:19 +0800 Subject: [PATCH 2/4] add change doc --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d5df86219..12893297ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -570,6 +570,7 @@ corresponding Ethereum API namespace: * (evm) [tharsis#496](https://github.com/cosmos/ethermint/pull/496) Fix bugs on `journal.revert` and `CommitStateDB.Copy`. * (types) [tharsis#480](https://github.com/cosmos/ethermint/pull/480) Update [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) coin type to `60` to satisfy [EIP84](https://github.com/ethereum/EIPs/issues/84). * (types) [tharsis#513](https://github.com/cosmos/ethermint/pull/513) Fix simulated transaction bug that was causing a consensus error by unintentionally affecting the state. +* (types) [tharsis#1112](https://github.com/cosmos/ethermint/pull/1112) Add `GetBaseAccount` to avoid invalid account error when create vesting account. ## [v0.1.0] - 2020-08-23 From 6d314b67cf7baf9c7814abf25679184b2209910c Mon Sep 17 00:00:00 2001 From: mmsqe Date: Sun, 5 Jun 2022 22:58:47 +0800 Subject: [PATCH 3/4] add comment --- types/account.go | 1 + 1 file changed, 1 insertion(+) diff --git a/types/account.go b/types/account.go index 8e827623d4..4f7f8e0d71 100644 --- a/types/account.go +++ b/types/account.go @@ -52,6 +52,7 @@ func ProtoAccount() authtypes.AccountI { } } +// GetBaseAccount returns base account. func (acc EthAccount) GetBaseAccount() *authtypes.BaseAccount { return acc.BaseAccount } From 246edb9e4a837ef031cd29b35d756c63169caa1f Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 6 Jun 2022 09:37:37 +0800 Subject: [PATCH 4/4] change under unreleased --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12893297ac..2f3540421b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (evm) [tharsis#1088](https://github.com/tharsis/ethermint/pull/1088) Fix ability to append log in tx post processing. * (rpc) [tharsis#1081](https://github.com/tharsis/ethermint/pull/1081) fix `debug_getBlockRlp`/`debug_printBlock` don't filter failed transactions. * (ante) [tharsis#1111](https://github.com/tharsis/ethermint/pull/1111) Move CanTransfer decorator before GasConsume decorator +* (types) [tharsis#1112](https://github.com/cosmos/ethermint/pull/1112) Add `GetBaseAccount` to avoid invalid account error when create vesting account. ## [v0.15.0] - 2022-05-09 @@ -570,7 +571,6 @@ corresponding Ethereum API namespace: * (evm) [tharsis#496](https://github.com/cosmos/ethermint/pull/496) Fix bugs on `journal.revert` and `CommitStateDB.Copy`. * (types) [tharsis#480](https://github.com/cosmos/ethermint/pull/480) Update [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) coin type to `60` to satisfy [EIP84](https://github.com/ethereum/EIPs/issues/84). * (types) [tharsis#513](https://github.com/cosmos/ethermint/pull/513) Fix simulated transaction bug that was causing a consensus error by unintentionally affecting the state. -* (types) [tharsis#1112](https://github.com/cosmos/ethermint/pull/1112) Add `GetBaseAccount` to avoid invalid account error when create vesting account. ## [v0.1.0] - 2020-08-23