mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-25 15:55:18 +00:00
Update default account to BaseAccount (#1263)
* update default account to use base account, not eth account * fix: use base account in test Co-authored-by: karzak <kjydavis3@gmail.com>
This commit is contained in:
parent
21206cc3ee
commit
70c0cafd64
@ -83,7 +83,6 @@ import (
|
|||||||
dbm "github.com/tendermint/tm-db"
|
dbm "github.com/tendermint/tm-db"
|
||||||
evmante "github.com/tharsis/ethermint/app/ante"
|
evmante "github.com/tharsis/ethermint/app/ante"
|
||||||
ethermintconfig "github.com/tharsis/ethermint/server/config"
|
ethermintconfig "github.com/tharsis/ethermint/server/config"
|
||||||
ethermint "github.com/tharsis/ethermint/types"
|
|
||||||
"github.com/tharsis/ethermint/x/evm"
|
"github.com/tharsis/ethermint/x/evm"
|
||||||
evmrest "github.com/tharsis/ethermint/x/evm/client/rest"
|
evmrest "github.com/tharsis/ethermint/x/evm/client/rest"
|
||||||
evmkeeper "github.com/tharsis/ethermint/x/evm/keeper"
|
evmkeeper "github.com/tharsis/ethermint/x/evm/keeper"
|
||||||
@ -401,7 +400,7 @@ func NewApp(
|
|||||||
appCodec,
|
appCodec,
|
||||||
keys[authtypes.StoreKey],
|
keys[authtypes.StoreKey],
|
||||||
authSubspace,
|
authSubspace,
|
||||||
ethermint.ProtoAccount,
|
authtypes.ProtoBaseAccount,
|
||||||
mAccPerms,
|
mAccPerms,
|
||||||
)
|
)
|
||||||
app.bankKeeper = bankkeeper.NewBaseKeeper(
|
app.bankKeeper = bankkeeper.NewBaseKeeper(
|
||||||
|
@ -20,7 +20,6 @@ import (
|
|||||||
abci "github.com/tendermint/tendermint/abci/types"
|
abci "github.com/tendermint/tendermint/abci/types"
|
||||||
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
|
||||||
tmtime "github.com/tendermint/tendermint/types/time"
|
tmtime "github.com/tendermint/tendermint/types/time"
|
||||||
ethermint "github.com/tharsis/ethermint/types"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var defaultSwapFee = sdk.MustNewDecFromStr("0.003")
|
var defaultSwapFee = sdk.MustNewDecFromStr("0.003")
|
||||||
@ -104,7 +103,7 @@ func (suite *Suite) NewAccountFromAddr(addr sdk.AccAddress, balance sdk.Coins) a
|
|||||||
// CreateVestingAccount creates a new vesting account from the provided balance and vesting balance
|
// CreateVestingAccount creates a new vesting account from the provided balance and vesting balance
|
||||||
func (suite *Suite) CreateVestingAccount(initialBalance sdk.Coins, vestingBalance sdk.Coins) authtypes.AccountI {
|
func (suite *Suite) CreateVestingAccount(initialBalance sdk.Coins, vestingBalance sdk.Coins) authtypes.AccountI {
|
||||||
acc := suite.CreateAccount(initialBalance)
|
acc := suite.CreateAccount(initialBalance)
|
||||||
bacc := acc.(*ethermint.EthAccount)
|
bacc := acc.(*authtypes.BaseAccount)
|
||||||
|
|
||||||
periods := vestingtypes.Periods{
|
periods := vestingtypes.Periods{
|
||||||
vestingtypes.Period{
|
vestingtypes.Period{
|
||||||
@ -112,7 +111,7 @@ func (suite *Suite) CreateVestingAccount(initialBalance sdk.Coins, vestingBalanc
|
|||||||
Amount: vestingBalance,
|
Amount: vestingBalance,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
vacc := vestingtypes.NewPeriodicVestingAccount(bacc.BaseAccount, initialBalance, time.Now().Unix(), periods) // TODO is initialBalance correct for originalVesting?
|
vacc := vestingtypes.NewPeriodicVestingAccount(bacc, initialBalance, time.Now().Unix(), periods) // TODO is initialBalance correct for originalVesting?
|
||||||
|
|
||||||
return vacc
|
return vacc
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user