Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vesting): Add BDD tests and ClawbackVestingAccount by Agoric (ENG-476 & ENG-385) #268

Merged
merged 28 commits into from
Feb 17, 2022
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e33110c
integrationTests(Vesting): add vesting tests under icentives module
danburck Feb 11, 2022
598194b
integrationTests(Vesting): add vesting tests for transfer
danburck Feb 11, 2022
5e90675
integrationTests(Vesting): correct spelling
danburck Feb 11, 2022
56af40f
integrationTests(Vesting): update comment
danburck Feb 11, 2022
1b0c39c
integrationTests(Vesting): get locked and spendable coins from store
danburck Feb 11, 2022
48393d4
integrationTests(Vesting): move testing files to new module folder (s…
danburck Feb 11, 2022
89f3185
integrationTests(Vesting): refactor test structure
danburck Feb 11, 2022
e7ad5ac
Merge branch 'main' into ENG-476-BDD-tests
danburck Feb 11, 2022
6a93f79
integrationTests(Vesting): refactor wording
danburck Feb 11, 2022
2bb1fd1
Merge branch 'ENG-476-BDD-tests' of github.com:tharsis/evmos into ENG…
danburck Feb 11, 2022
e9b35ff
integrationTests(Vesting): split cliff and lock cases
danburck Feb 11, 2022
b66ef28
integrationTests(Vesting): split cliff and lock cases
danburck Feb 11, 2022
2388907
Merge branch 'main' into ENG-476-BDD-tests
fedekunze Feb 15, 2022
9b33d81
Merge branch 'main' into ENG-476-BDD-tests
danburck Feb 16, 2022
e8c5491
merge main and add todos
danburck Feb 16, 2022
faa0af1
feat(vesting): copy files and make proto
danburck Feb 16, 2022
a3bf417
feat(vesting): implement custom staking logic and move keeper functio…
danburck Feb 16, 2022
9ac5f8a
feat(vesting): replace keeper types import
danburck Feb 17, 2022
199e0b4
feat(vesting): remove duplicate sdk proto and types
danburck Feb 17, 2022
382f15e
feat(vesting): fix lint and codec
danburck Feb 17, 2022
d0b27cb
feat(vesting): refactor vesting tests to use clawback vesting accounts
danburck Feb 17, 2022
f7a3cc0
feat(vesting): add lockup tests
danburck Feb 17, 2022
6c5f766
feat(vesting): add governance tests
danburck Feb 17, 2022
655e1e0
feat(vesting): comment out tests
danburck Feb 17, 2022
6af00ad
feat(vesting): delete vesting calculator
danburck Feb 17, 2022
8dd316f
Merge branch 'main' into ENG-476-BDD-tests
danburck Feb 17, 2022
46be3d4
fix IBC test
fedekunze Feb 17, 2022
afb0f85
rm exported
fedekunze Feb 17, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ import (
authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation"
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"
"github.com/cosmos/cosmos-sdk/x/authz"
authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper"
authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module"
Expand Down Expand Up @@ -111,6 +109,7 @@ import (
"github.com/tharsis/evmos/x/claims"
claimskeeper "github.com/tharsis/evmos/x/claims/keeper"
claimstypes "github.com/tharsis/evmos/x/claims/types"

"github.com/tharsis/evmos/x/epochs"
epochskeeper "github.com/tharsis/evmos/x/epochs/keeper"
epochstypes "github.com/tharsis/evmos/x/epochs/types"
Expand All @@ -125,6 +124,9 @@ import (
"github.com/tharsis/evmos/x/inflation"
inflationkeeper "github.com/tharsis/evmos/x/inflation/keeper"
inflationtypes "github.com/tharsis/evmos/x/inflation/types"
"github.com/tharsis/evmos/x/vesting"
vestingkeeper "github.com/tharsis/evmos/x/vesting/keeper"
vestingtypes "github.com/tharsis/evmos/x/vesting/types"
)

func init() {
Expand Down Expand Up @@ -263,6 +265,7 @@ type Evmos struct {
Erc20Keeper erc20keeper.Keeper
IncentivesKeeper incentiveskeeper.Keeper
EpochsKeeper epochskeeper.Keeper
VestingKeeper vestingkeeper.Keeper

// the module manager
mm *module.Manager
Expand Down Expand Up @@ -317,11 +320,8 @@ func NewEvmos(
// ethermint keys
evmtypes.StoreKey, feemarkettypes.StoreKey,
// evmos keys
inflationtypes.StoreKey,
erc20types.StoreKey,
incentivestypes.StoreKey,
epochstypes.StoreKey,
claimstypes.StoreKey,
inflationtypes.StoreKey, erc20types.StoreKey, incentivestypes.StoreKey,
epochstypes.StoreKey, claimstypes.StoreKey, vestingtypes.StoreKey,
)

// Add the EVM transient store key
Expand Down Expand Up @@ -433,9 +433,15 @@ func NewEvmos(
app.DistrKeeper.Hooks(),
app.SlashingKeeper.Hooks(),
app.ClaimsKeeper.Hooks(),
app.VestingKeeper.Hooks(),
),
)

app.VestingKeeper = vestingkeeper.NewKeeper(
keys[vestingtypes.StoreKey], appCodec,
app.AccountKeeper, app.BankKeeper, app.StakingKeeper,
)

app.Erc20Keeper = erc20keeper.NewKeeper(
keys[erc20types.StoreKey], appCodec, app.GetSubspace(erc20types.ModuleName),
app.AccountKeeper, app.BankKeeper, app.EvmKeeper,
Expand All @@ -450,7 +456,6 @@ func NewEvmos(
app.EpochsKeeper = *epochsKeeper.SetHooks(
epochskeeper.NewMultiEpochHooks(
// insert epoch hooks receivers here
// TODO activate Inflation hook
app.IncentivesKeeper.Hooks(),
app.InflationKeeper.Hooks(),
),
Expand Down Expand Up @@ -511,7 +516,6 @@ func NewEvmos(
encodingConfig.TxConfig,
),
auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts),
vesting.NewAppModule(app.AccountKeeper, app.BankKeeper),
bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper),
capability.NewAppModule(appCodec, *app.CapabilityKeeper),
crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants),
Expand All @@ -532,12 +536,12 @@ func NewEvmos(
evm.NewAppModule(app.EvmKeeper, app.AccountKeeper),
feemarket.NewAppModule(app.FeeMarketKeeper),
// Evmos app modules
// TODO is inflation vesting account and AccountKeeper needed ?
inflation.NewAppModule(app.InflationKeeper, app.AccountKeeper, app.StakingKeeper),
erc20.NewAppModule(app.Erc20Keeper, app.AccountKeeper),
incentives.NewAppModule(app.IncentivesKeeper, app.AccountKeeper),
epochs.NewAppModule(appCodec, app.EpochsKeeper),
claims.NewAppModule(appCodec, app.ClaimsKeeper),
vesting.NewAppModule(app.VestingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper),
)

// During begin block slashing happens after distr.BeginBlocker so that
Expand Down Expand Up @@ -599,6 +603,7 @@ func NewEvmos(
feegrant.ModuleName,
paramstypes.ModuleName,
upgradetypes.ModuleName,
// Evmos modules
vestingtypes.ModuleName,
inflationtypes.ModuleName,
erc20types.ModuleName,
Expand Down Expand Up @@ -629,10 +634,10 @@ func NewEvmos(
feegrant.ModuleName,
paramstypes.ModuleName,
upgradetypes.ModuleName,
vestingtypes.ModuleName,
// Ethermint modules
evmtypes.ModuleName, feemarkettypes.ModuleName,
// Evmos modules
vestingtypes.ModuleName,
inflationtypes.ModuleName,
erc20types.ModuleName,
incentivestypes.ModuleName,
Expand Down
9 changes: 4 additions & 5 deletions client/docs/statik/statik.go

Large diffs are not rendered by default.

Loading