Adds AppModuleBasic and Genesis Functions (#62)

* Adds AppModuleBasic implementation and genesis functions

* Fixes  broken links

* Adds .idea/

* Adds starter for missing genesis funcs

* Completes AppModuleBasic interface

* Removes comment
This commit is contained in:
David Ansermino
2019-07-08 12:02:20 -04:00
committed by Austin Abell
parent ba203d3f26
commit 1d490ba4d9
8 changed files with 123 additions and 27 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
package app
import (
"github.com/cosmos/ethermint/x/evm"
"os"
bam "github.com/cosmos/cosmos-sdk/baseapp"
@@ -164,7 +165,7 @@ func (app *EthermintApp) initChainer(
_ sdk.Context, req abci.RequestInitChain,
) abci.ResponseInitChain {
var genesisState GenesisState
var genesisState evm.GenesisState
stateJSON := req.AppStateBytes
err := app.cdc.UnmarshalJSON(stateJSON, &genesisState)
-22
View File
@@ -1,22 +0,0 @@
package app
import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/ethermint/types"
)
type (
// GenesisState defines the application's genesis state. It contains all the
// information required and accounts to initialize the blockchain.
GenesisState struct {
Accounts []GenesisAccount `json:"accounts"`
}
// GenesisAccount defines an account to be initialized in the genesis state.
GenesisAccount struct {
Address sdk.AccAddress `json:"address"`
Coins sdk.Coins `json:"coins"`
Code []byte `json:"code,omitempty"`
Storage types.Storage `json:"storage,omitempty"`
}
)