chore: un-fork from cosmos (#166)

* chore: un-fork from cosmos

* rm LoC
This commit is contained in:
Federico Kunze
2021-06-22 06:49:18 -04:00
committed by GitHub
parent fada59551d
commit 6000ab2098
106 changed files with 340 additions and 273 deletions
+3 -3
View File
@@ -11,9 +11,9 @@ The `x/evm` module is responsible for executing Ethereum Virtual Machine (EVM) s
"github.com/cosmos/cosmos-sdk/x/auth"
"github.com/cosmos/cosmos-sdk/x/bank"
"github.com/cosmos/ethermint/app/ante"
ethermint "github.com/cosmos/ethermint/types"
"github.com/cosmos/ethermint/x/evm"
"github.com/tharsis/ethermint/app/ante"
ethermint "github.com/tharsis/ethermint/types"
"github.com/tharsis/ethermint/x/evm"
)
```
+4 -4
View File
@@ -1,6 +1,6 @@
[module]
description = "The evm module executes Ethereum Virtual Machine (EVM) state transitions."
homepage = "https://github.com/cosmos/ethermint"
homepage = "https://github.com/tharsis/ethermint"
keywords = [
"evm",
"ethereum",
@@ -10,7 +10,7 @@ keywords = [
name = "x/evm"
[bug_tracker]
url = "https://github.com/cosmos/ethermint/issues"
url = "https://github.com/tharsis/ethermint/issues"
[[authors]]
name = "fedekunze"
@@ -28,7 +28,7 @@ name = "noot"
name = "araskachoi"
[version]
documentation = "https://raw.githubusercontent.com/cosmos/ethermint/development/x/evm/atlas/atlas-v0.3.1.md"
repo = "https://github.com/cosmos/ethermint/releases/tag/v0.3.1"
documentation = "https://raw.githubusercontent.com/tharsis/ethermint/main/x/evm/atlas/atlas-v0.3.1.md"
repo = "https://github.com/tharsis/ethermint/releases/tag/v0.3.1"
sdk_compat = "v0.39.x"
version = "v0.3.1"
+2 -2
View File
@@ -1,13 +1,13 @@
package cli
import (
rpctypes "github.com/cosmos/ethermint/ethereum/rpc/types"
"github.com/spf13/cobra"
rpctypes "github.com/tharsis/ethermint/ethereum/rpc/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/ethermint/x/evm/types"
"github.com/tharsis/ethermint/x/evm/types"
)
// GetQueryCmd returns the parent command for all x/bank CLi query commands.
+1 -1
View File
@@ -14,7 +14,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/rest"
authrest "github.com/cosmos/cosmos-sdk/x/auth/client/rest"
rpctypes "github.com/cosmos/ethermint/ethereum/rpc/types"
rpctypes "github.com/tharsis/ethermint/ethereum/rpc/types"
"github.com/ethereum/go-ethereum/common"
)
+3 -3
View File
@@ -8,9 +8,9 @@ import (
ethcmn "github.com/ethereum/go-ethereum/common"
abci "github.com/tendermint/tendermint/abci/types"
ethermint "github.com/cosmos/ethermint/types"
"github.com/cosmos/ethermint/x/evm/keeper"
"github.com/cosmos/ethermint/x/evm/types"
ethermint "github.com/tharsis/ethermint/types"
"github.com/tharsis/ethermint/x/evm/keeper"
"github.com/tharsis/ethermint/x/evm/types"
)
// InitGenesis initializes genesis state based on exported genesis
+4 -4
View File
@@ -4,10 +4,10 @@ import (
"github.com/ethereum/go-ethereum/common"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/cosmos/ethermint/crypto/ethsecp256k1"
ethermint "github.com/cosmos/ethermint/types"
"github.com/cosmos/ethermint/x/evm"
"github.com/cosmos/ethermint/x/evm/types"
"github.com/tharsis/ethermint/crypto/ethsecp256k1"
ethermint "github.com/tharsis/ethermint/types"
"github.com/tharsis/ethermint/x/evm"
"github.com/tharsis/ethermint/x/evm/types"
)
func (suite *EvmTestSuite) TestInitGenesis() {
+1 -1
View File
@@ -8,7 +8,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/ethermint/x/evm/types"
"github.com/tharsis/ethermint/x/evm/types"
)
// NewHandler returns a handler for Ethermint type messages.
+4 -4
View File
@@ -14,10 +14,10 @@ import (
"github.com/cosmos/cosmos-sdk/crypto/keyring"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/ethermint/app"
"github.com/cosmos/ethermint/crypto/ethsecp256k1"
"github.com/cosmos/ethermint/tests"
"github.com/cosmos/ethermint/x/evm"
"github.com/tharsis/ethermint/app"
"github.com/tharsis/ethermint/crypto/ethsecp256k1"
"github.com/tharsis/ethermint/tests"
"github.com/tharsis/ethermint/x/evm"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
)
+1 -1
View File
@@ -11,7 +11,7 @@ import (
"github.com/cosmos/cosmos-sdk/telemetry"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/ethermint/x/evm/types"
"github.com/tharsis/ethermint/x/evm/types"
)
// BeginBlock sets the block hash -> block height map for the previous block height
+2 -2
View File
@@ -12,8 +12,8 @@ import (
ethcmn "github.com/ethereum/go-ethereum/common"
ethermint "github.com/cosmos/ethermint/types"
"github.com/cosmos/ethermint/x/evm/types"
ethermint "github.com/tharsis/ethermint/types"
"github.com/tharsis/ethermint/x/evm/types"
)
var _ types.QueryServer = Keeper{}
+7 -7
View File
@@ -12,8 +12,8 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
ethermint "github.com/cosmos/ethermint/types"
"github.com/cosmos/ethermint/x/evm/types"
ethermint "github.com/tharsis/ethermint/types"
"github.com/tharsis/ethermint/x/evm/types"
grpctypes "github.com/cosmos/cosmos-sdk/types/grpc"
)
@@ -614,8 +614,8 @@ func (suite *KeeperTestSuite) TestQueryValidatorAccount() {
func() {
expAccount = &types.QueryValidatorAccountResponse{
AccountAddress: sdk.AccAddress(suite.address.Bytes()).String(),
Sequence: 0,
AccountNumber: 0,
Sequence: 0,
AccountNumber: 0,
}
req = &types.QueryValidatorAccountRequest{
ConsAddress: suite.consAddress.String(),
@@ -633,8 +633,8 @@ func (suite *KeeperTestSuite) TestQueryValidatorAccount() {
expAccount = &types.QueryValidatorAccountResponse{
AccountAddress: sdk.AccAddress(suite.address.Bytes()).String(),
Sequence: 10,
AccountNumber: 1,
Sequence: 10,
AccountNumber: 1,
}
req = &types.QueryValidatorAccountRequest{
ConsAddress: suite.consAddress.String(),
@@ -662,4 +662,4 @@ func (suite *KeeperTestSuite) TestQueryValidatorAccount() {
}
})
}
}
}
+2 -2
View File
@@ -12,8 +12,8 @@ import (
ethtypes "github.com/ethereum/go-ethereum/core/types"
"github.com/tendermint/tendermint/libs/log"
ethermint "github.com/cosmos/ethermint/types"
"github.com/cosmos/ethermint/x/evm/types"
ethermint "github.com/tharsis/ethermint/types"
"github.com/tharsis/ethermint/x/evm/types"
)
// Keeper wraps the CommitStateDB, allowing us to pass in SDK context while adhering
+4 -4
View File
@@ -1,7 +1,7 @@
package keeper_test
import (
"github.com/cosmos/ethermint/crypto/ethsecp256k1"
"github.com/tharsis/ethermint/crypto/ethsecp256k1"
"testing"
"time"
@@ -12,9 +12,9 @@ import (
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"github.com/cosmos/ethermint/app"
ethermint "github.com/cosmos/ethermint/types"
"github.com/cosmos/ethermint/x/evm/types"
"github.com/tharsis/ethermint/app"
ethermint "github.com/tharsis/ethermint/types"
"github.com/tharsis/ethermint/x/evm/types"
ethcmn "github.com/ethereum/go-ethereum/common"
ethcrypto "github.com/ethereum/go-ethereum/crypto"
+1 -1
View File
@@ -13,7 +13,7 @@ import (
"github.com/cosmos/cosmos-sdk/telemetry"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/ethermint/x/evm/types"
"github.com/tharsis/ethermint/x/evm/types"
)
var _ types.MsgServer = &Keeper{}
+1 -1
View File
@@ -3,7 +3,7 @@ package keeper
import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/ethermint/x/evm/types"
"github.com/tharsis/ethermint/x/evm/types"
)
// GetParams returns the total set of evm parameters.
+1 -1
View File
@@ -1,7 +1,7 @@
package keeper_test
import (
"github.com/cosmos/ethermint/x/evm/types"
"github.com/tharsis/ethermint/x/evm/types"
)
func (suite *KeeperTestSuite) TestParams() {
+2 -2
View File
@@ -14,8 +14,8 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
ethermint "github.com/cosmos/ethermint/types"
"github.com/cosmos/ethermint/x/evm/types"
ethermint "github.com/tharsis/ethermint/types"
"github.com/tharsis/ethermint/x/evm/types"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
+2 -2
View File
@@ -12,8 +12,8 @@ import (
"github.com/cosmos/cosmos-sdk/store/prefix"
sdk "github.com/cosmos/cosmos-sdk/types"
ethermint "github.com/cosmos/ethermint/types"
"github.com/cosmos/ethermint/x/evm/types"
ethermint "github.com/tharsis/ethermint/types"
"github.com/tharsis/ethermint/x/evm/types"
)
var _ vm.StateDB = &Keeper{}
+2 -2
View File
@@ -7,11 +7,11 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/cosmos/ethermint/tests"
"github.com/cosmos/ethermint/x/evm/types"
"github.com/ethereum/go-ethereum/common"
ethtypes "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/tharsis/ethermint/tests"
"github.com/tharsis/ethermint/x/evm/types"
)
func (suite *KeeperTestSuite) TestCreateAccount() {
+3 -3
View File
@@ -17,9 +17,9 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/ethermint/x/evm/client/cli"
"github.com/cosmos/ethermint/x/evm/keeper"
"github.com/cosmos/ethermint/x/evm/types"
"github.com/tharsis/ethermint/x/evm/client/cli"
"github.com/tharsis/ethermint/x/evm/keeper"
"github.com/tharsis/ethermint/x/evm/types"
)
var (
+4 -4
View File
@@ -27,7 +27,7 @@ The usage pattern is as follows:
The `x/evm` module `GenesisState` defines the state necessary for initializing the chain from a previous exported height.
+++ https://github.com/cosmos/ethermint/blob/v0.3.1/x/evm/types/genesis.go#L14-L20
+++ https://github.com/tharsis/ethermint/blob/v0.3.1/x/evm/types/genesis.go#L14-L20
### Genesis Accounts
@@ -42,7 +42,7 @@ module `AccountKeeper` and the balance must match the balance of the `EvmDenom`
defined on the `GenesisState`'s `Param`. The values for the address and the balance amount maintain
the same format as the ones from the SDK to make manual inspections easier on the genesis.json.
+++ https://github.com/cosmos/ethermint/blob/v0.3.1/x/evm/types/genesis.go#L22-L30
+++ https://github.com/tharsis/ethermint/blob/v0.3.1/x/evm/types/genesis.go#L22-L30
### Transaction Logs
@@ -54,7 +54,7 @@ state to prevent the queries from failing.
`TxsLogs` is the field that contains all the transaction logs that need to be persisted after an
upgrade. It uses an array instead of a map to ensure determinism on the iteration.
+++ https://github.com/cosmos/ethermint/blob/v0.3.1/x/evm/types/logs.go#L12-L18
+++ https://github.com/tharsis/ethermint/blob/v0.3.1/x/evm/types/logs.go#L12-L18
### Chain Config
@@ -70,7 +70,7 @@ to a past block).
If you want to update the config values, use an software upgrade procedure.
+++ https://github.com/cosmos/ethermint/blob/v0.3.1/x/evm/types/chain_config.go#L16-L45
+++ https://github.com/tharsis/ethermint/blob/v0.3.1/x/evm/types/chain_config.go#L16-L45
### Params
+2 -2
View File
@@ -28,7 +28,7 @@ Instead of using a trie and database for querying and persistence, the `CommitSt
The `CommitStateDB` contains a store key that allows the DB to write to a concrete subtree of the
multistore that is only accessible to the EVM module.
+++ https://github.com/cosmos/ethermint/blob/v0.3.1/x/evm/types/statedb.go#L33-L85
+++ https://github.com/tharsis/ethermint/blob/v0.3.1/x/evm/types/statedb.go#L33-L85
The functionalities provided by the Ethermint `StateDB` are:
@@ -68,7 +68,7 @@ halting.
When a `stateObject` is committed during `EndBlock`. It sets sets the account contract code to store, as well as the dirty storage state. The account's nonce and the account balance are updated by calling the `auth` and `bank` module setter functions, respectively.
+++ https://github.com/cosmos/ethermint/blob/v0.3.1/x/evm/types/state_object.go#L49-L81
+++ https://github.com/tharsis/ethermint/blob/v0.3.1/x/evm/types/state_object.go#L49-L81
The functionalities provided by the Ethermint `stateObject` are:
+2 -2
View File
@@ -13,9 +13,9 @@ One remark about the `MsgEthereumTx` is that it implements both the [`sdk.Msg`](
interfaces (generally SDK messages only implement the former, while the latter is a group of
messages bundled together). The reason of this, is because the `MsgEthereumTx` must not be included in a [`auth.StdTx`](https://github.com/cosmos/cosmos-sdk/blob/v0.39.2/x/auth/types/stdtx.go#L23-L30) (SDK's standard transaction type) as it performs gas and fee checks using the Ethereum logic from Geth instead of the Cosmos SDK checks done on the `auth` module `AnteHandler`.
+++ https://github.com/cosmos/ethermint/blob/v0.3.1/x/evm/types/msg.go#L117-L124
+++ https://github.com/tharsis/ethermint/blob/v0.3.1/x/evm/types/msg.go#L117-L124
+++ https://github.com/cosmos/ethermint/blob/v0.3.1/x/evm/types/tx_data.go#L12-L29
+++ https://github.com/tharsis/ethermint/blob/v0.3.1/x/evm/types/tx_data.go#L12-L29
This message validation is expected to fail if:
+1 -1
View File
@@ -4,8 +4,8 @@ import (
"errors"
"fmt"
ethermint "github.com/cosmos/ethermint/types"
ethcmn "github.com/ethereum/go-ethereum/common"
ethermint "github.com/tharsis/ethermint/types"
)
// Validate performs a basic validation of a GenesisAccount fields.
+1 -1
View File
@@ -7,7 +7,7 @@ import (
ethcmn "github.com/ethereum/go-ethereum/common"
"github.com/cosmos/ethermint/crypto/ethsecp256k1"
"github.com/tharsis/ethermint/crypto/ethsecp256k1"
)
type GenesisTestSuite struct {
+1 -1
View File
@@ -7,7 +7,7 @@ import (
ethcmn "github.com/ethereum/go-ethereum/common"
ethtypes "github.com/ethereum/go-ethereum/core/types"
ethermint "github.com/cosmos/ethermint/types"
ethermint "github.com/tharsis/ethermint/types"
)
// NewTransactionLogs creates a new NewTransactionLogs instance.
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/cosmos/ethermint/crypto/ethsecp256k1"
"github.com/tharsis/ethermint/crypto/ethsecp256k1"
ethcmn "github.com/ethereum/go-ethereum/common"
ethcrypto "github.com/ethereum/go-ethereum/crypto"
+1 -1
View File
@@ -9,7 +9,7 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
"github.com/cosmos/ethermint/types"
"github.com/tharsis/ethermint/types"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
+2 -2
View File
@@ -8,8 +8,8 @@ import (
"github.com/cosmos/cosmos-sdk/crypto/keyring"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/ethermint/crypto/ethsecp256k1"
"github.com/cosmos/ethermint/tests"
"github.com/tharsis/ethermint/crypto/ethsecp256k1"
"github.com/tharsis/ethermint/tests"
ethcmn "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
+1 -1
View File
@@ -7,8 +7,8 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
"github.com/cosmos/ethermint/types"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/tharsis/ethermint/types"
)
var _ paramtypes.ParamSet = &Params{}
+1 -1
View File
@@ -5,7 +5,7 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/ethermint/types"
"github.com/tharsis/ethermint/types"
ethcmn "github.com/ethereum/go-ethereum/common"
)
+1 -1
View File
@@ -4,9 +4,9 @@ import (
"math/big"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/ethermint/types"
"github.com/ethereum/go-ethereum/common"
ethtypes "github.com/ethereum/go-ethereum/core/types"
"github.com/tharsis/ethermint/types"
)
// var _ ethtypes.TxData = &TxData{}
+1 -1
View File
@@ -4,9 +4,9 @@ import (
"math/big"
"testing"
"github.com/cosmos/ethermint/tests"
"github.com/ethereum/go-ethereum/common"
"github.com/stretchr/testify/require"
"github.com/tharsis/ethermint/tests"
)
func TestTxData_chainID(t *testing.T) {
+1 -1
View File
@@ -4,8 +4,8 @@ import (
"testing"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/ethermint/crypto/ethsecp256k1"
proto "github.com/gogo/protobuf/proto"
"github.com/tharsis/ethermint/crypto/ethsecp256k1"
"github.com/stretchr/testify/require"