-
Notifications
You must be signed in to change notification settings - Fork 202
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
fix(evm): Use a NibiruBankKeeper to automatically record ether balance changes on the StateDB journal #2095
Changes from 20 commits
295a2d9
80dd2d7
c624912
7f904a0
efbd52e
a8c100e
0ba8c0f
08a73ee
717ce1c
04a6897
17df448
7c34423
4e3bf3c
8056328
cc6a6a9
c4ca8a2
6a64e47
70b6e5e
53e8c59
9f7160b
a04fd06
9aa3a64
18892d2
c88e9c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,7 +83,7 @@ func (s *AnteTestSuite) TestGasWantedDecorator() { | |
for _, tc := range testCases { | ||
s.Run(tc.name, func() { | ||
deps := evmtest.NewTestDeps() | ||
stateDB := deps.StateDB() | ||
stateDB := deps.NewStateDB() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The function is renamed from |
||
anteDec := ante.AnteDecoratorGasWanted{} | ||
|
||
tx := tc.txSetup(&deps) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,7 +140,6 @@ type AppKeepers struct { | |
} | ||
|
||
type privateKeepers struct { | ||
bankBaseKeeper bankkeeper.BaseKeeper | ||
capabilityKeeper *capabilitykeeper.Keeper | ||
slashingKeeper slashingkeeper.Keeper | ||
crisisKeeper crisiskeeper.Keeper | ||
|
@@ -264,14 +263,17 @@ func (app *NibiruApp) InitKeepers( | |
govModuleAddr, | ||
) | ||
|
||
app.bankBaseKeeper = bankkeeper.NewBaseKeeper( | ||
appCodec, | ||
keys[banktypes.StoreKey], | ||
app.AccountKeeper, | ||
BlockedAddresses(), | ||
govModuleAddr, | ||
) | ||
app.BankKeeper = app.bankBaseKeeper | ||
nibiruBankKeeper := &evmkeeper.NibiruBankKeeper{ | ||
BaseKeeper: bankkeeper.NewBaseKeeper( | ||
appCodec, | ||
keys[banktypes.StoreKey], | ||
app.AccountKeeper, | ||
BlockedAddresses(), | ||
govModuleAddr, | ||
), | ||
StateDB: nil, | ||
} | ||
app.BankKeeper = nibiruBankKeeper | ||
app.StakingKeeper = stakingkeeper.NewKeeper( | ||
appCodec, | ||
keys[stakingtypes.StoreKey], | ||
|
@@ -367,16 +369,17 @@ func (app *NibiruApp) InitKeepers( | |
), | ||
) | ||
|
||
app.EvmKeeper = evmkeeper.NewKeeper( | ||
evmKeeper := evmkeeper.NewKeeper( | ||
appCodec, | ||
keys[evm.StoreKey], | ||
tkeys[evm.TransientKey], | ||
authtypes.NewModuleAddress(govtypes.ModuleName), | ||
app.AccountKeeper, | ||
app.BankKeeper, | ||
nibiruBankKeeper, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Written this way to make sure the EVM keeper and its constructor have the stronger typed |
||
app.StakingKeeper, | ||
cast.ToString(appOpts.Get("evm.tracer")), | ||
) | ||
app.EvmKeeper = &evmKeeper | ||
|
||
// ---------------------------------- IBC keepers | ||
|
||
|
@@ -608,7 +611,7 @@ func (app *NibiruApp) initAppModules( | |
), | ||
auth.NewAppModule(appCodec, app.AccountKeeper, authsims.RandomGenesisAccounts, app.GetSubspace(authtypes.ModuleName)), | ||
vesting.NewAppModule(app.AccountKeeper, app.BankKeeper), | ||
bank.NewAppModule(appCodec, app.bankBaseKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)), | ||
bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)), | ||
capability.NewAppModule(appCodec, *app.capabilityKeeper, false), | ||
feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry), | ||
gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)), | ||
|
@@ -633,7 +636,7 @@ func (app *NibiruApp) initAppModules( | |
ibcfee.NewAppModule(app.ibcFeeKeeper), | ||
ica.NewAppModule(&app.icaControllerKeeper, &app.icaHostKeeper), | ||
|
||
evmmodule.NewAppModule(&app.EvmKeeper, app.AccountKeeper), | ||
evmmodule.NewAppModule(app.EvmKeeper, app.AccountKeeper), | ||
|
||
// wasm | ||
wasm.NewAppModule( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to better about having meaningful changelog entry descriptions and keep it organized rather than simply copying PR titles.