forked from EscanBE/evermint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chain_app_imp.go
42 lines (33 loc) · 1.12 KB
/
chain_app_imp.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package types
//goland:noinspection SpellCheckingInspection
import (
chainapp "github.com/servprotocolorg/serv/v12/app"
abci "github.com/cometbft/cometbft/abci/types"
"github.com/cosmos/cosmos-sdk/baseapp"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
ibctesting "github.com/cosmos/ibc-go/v7/testing"
)
var _ ChainApp = &chainAppImp{}
type chainAppImp struct {
app *chainapp.Serv
}
func (c chainAppImp) App() abci.Application {
return c.app
}
func (c chainAppImp) BaseApp() *baseapp.BaseApp {
return c.app.BaseApp
}
func (c chainAppImp) IbcTestingApp() ibctesting.TestingApp {
return c.app
}
func (c chainAppImp) InterfaceRegistry() codectypes.InterfaceRegistry {
return c.app.InterfaceRegistry()
}
func (c chainAppImp) FundAccount(ctx sdk.Context, account *TestAccount, amounts sdk.Coins) error {
if err := c.BankKeeper().MintCoins(ctx, minttypes.ModuleName, amounts); err != nil {
return err
}
return c.BankKeeper().SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, account.GetCosmosAddress(), amounts)
}