Merge PR #4661: x/supply: use internal package
This commit is contained in:
parent
66e85c592d
commit
179476d6b0
|
@ -1,4 +1,6 @@
|
||||||
#4255 Add supply module that passively tracks the supplies of a chain
|
#4255 Add supply module that passively tracks the supplies of a chain
|
||||||
|
- Renamed `x/distribution` `ModuleName`
|
||||||
|
- Genesis JSON and CLI now use `distribution` instead of `distr`
|
||||||
- Introduce `ModuleAccount` type, which tracks the flow of coins held within a module
|
- Introduce `ModuleAccount` type, which tracks the flow of coins held within a module
|
||||||
- Replaced `FeeCollectorKeeper` for a `ModuleAccount`
|
- Replaced `FeeCollectorKeeper` for a `ModuleAccount`
|
||||||
- Replaced the staking `Pool`, which coins are now held by the `BondedPool` and `NotBonded` module accounts
|
- Replaced the staking `Pool`, which coins are now held by the `BondedPool` and `NotBonded` module accounts
|
||||||
|
|
|
@ -910,7 +910,6 @@ func TestAppImportExport(t *testing.T) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
fmt.Printf("debug genesisState: %s\n", genesisState)
|
|
||||||
|
|
||||||
ctxB := newApp.NewContext(true, abci.Header{})
|
ctxB := newApp.NewContext(true, abci.Header{})
|
||||||
newApp.mm.InitGenesis(ctxB, genesisState)
|
newApp.mm.InitGenesis(ctxB, genesisState)
|
||||||
|
|
|
@ -5,6 +5,7 @@ import (
|
||||||
abci "github.com/tendermint/tendermint/abci/types"
|
abci "github.com/tendermint/tendermint/abci/types"
|
||||||
dbm "github.com/tendermint/tendermint/libs/db"
|
dbm "github.com/tendermint/tendermint/libs/db"
|
||||||
"github.com/tendermint/tendermint/libs/log"
|
"github.com/tendermint/tendermint/libs/log"
|
||||||
|
"github.com/tendermint/tendermint/crypto"
|
||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/codec"
|
"github.com/cosmos/cosmos-sdk/codec"
|
||||||
"github.com/cosmos/cosmos-sdk/store"
|
"github.com/cosmos/cosmos-sdk/store"
|
||||||
|
@ -12,7 +13,6 @@ import (
|
||||||
"github.com/cosmos/cosmos-sdk/x/auth/types"
|
"github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||||
"github.com/cosmos/cosmos-sdk/x/params/subspace"
|
"github.com/cosmos/cosmos-sdk/x/params/subspace"
|
||||||
"github.com/cosmos/cosmos-sdk/x/supply/exported"
|
"github.com/cosmos/cosmos-sdk/x/supply/exported"
|
||||||
supplytypes "github.com/cosmos/cosmos-sdk/x/supply/types"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type testInput struct {
|
type testInput struct {
|
||||||
|
@ -22,12 +22,32 @@ type testInput struct {
|
||||||
sk types.SupplyKeeper
|
sk types.SupplyKeeper
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// moduleAccount defines an account for modules that holds coins on a pool
|
||||||
|
type moduleAccount struct {
|
||||||
|
*types.BaseAccount
|
||||||
|
Name string `json:"name"` // name of the module
|
||||||
|
Permission string `json:"permission"` // permission of module account (minter/burner/holder)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// GetName returns the the name of the holder's module
|
||||||
|
func (ma moduleAccount) GetName() string {
|
||||||
|
return ma.Name
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPermission returns permission granted to the module account (holder/minter/burner)
|
||||||
|
func (ma moduleAccount) GetPermission() string {
|
||||||
|
return ma.Permission
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
func setupTestInput() testInput {
|
func setupTestInput() testInput {
|
||||||
db := dbm.NewMemDB()
|
db := dbm.NewMemDB()
|
||||||
|
|
||||||
cdc := codec.New()
|
cdc := codec.New()
|
||||||
types.RegisterCodec(cdc)
|
types.RegisterCodec(cdc)
|
||||||
supplytypes.RegisterCodec(cdc)
|
cdc.RegisterInterface((*exported.ModuleAccountI)(nil), nil)
|
||||||
|
cdc.RegisterConcrete(&moduleAccount{}, "cosmos-sdk/ModuleAccount", nil)
|
||||||
codec.RegisterCrypto(cdc)
|
codec.RegisterCrypto(cdc)
|
||||||
|
|
||||||
authCapKey := sdk.NewKVStoreKey("authCapKey")
|
authCapKey := sdk.NewKVStoreKey("authCapKey")
|
||||||
|
@ -101,8 +121,16 @@ func (sk DummySupplyKeeper) GetModuleAccount(ctx sdk.Context, moduleName string)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
moduleAddress := sk.GetModuleAddress(moduleName)
|
||||||
|
baseAcc := types.NewBaseAccountWithAddress(moduleAddress)
|
||||||
|
|
||||||
// create a new module account
|
// create a new module account
|
||||||
macc := supplytypes.NewEmptyModuleAccount(moduleName, "basic")
|
macc := &moduleAccount{
|
||||||
|
BaseAccount: &baseAcc,
|
||||||
|
Name: moduleName,
|
||||||
|
Permission: "basic",
|
||||||
|
}
|
||||||
|
|
||||||
maccI := (sk.ak.NewAccount(ctx, macc)).(exported.ModuleAccountI)
|
maccI := (sk.ak.NewAccount(ctx, macc)).(exported.ModuleAccountI)
|
||||||
sk.ak.SetAccount(ctx, maccI)
|
sk.ak.SetAccount(ctx, maccI)
|
||||||
return maccI
|
return maccI
|
||||||
|
@ -110,5 +138,5 @@ func (sk DummySupplyKeeper) GetModuleAccount(ctx sdk.Context, moduleName string)
|
||||||
|
|
||||||
// GetModuleAddress for dummy supply keeper
|
// GetModuleAddress for dummy supply keeper
|
||||||
func (sk DummySupplyKeeper) GetModuleAddress(moduleName string) sdk.AccAddress {
|
func (sk DummySupplyKeeper) GetModuleAddress(moduleName string) sdk.AccAddress {
|
||||||
return supplytypes.NewModuleAddress(moduleName)
|
return sdk.AccAddress(crypto.AddressHash([]byte(moduleName)))
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/keeper"
|
"github.com/cosmos/cosmos-sdk/x/bank/internal/keeper"
|
||||||
"github.com/cosmos/cosmos-sdk/x/bank/internal/types"
|
"github.com/cosmos/cosmos-sdk/x/bank/internal/types"
|
||||||
"github.com/cosmos/cosmos-sdk/x/mock"
|
"github.com/cosmos/cosmos-sdk/x/mock"
|
||||||
supplytypes "github.com/cosmos/cosmos-sdk/x/supply/types"
|
"github.com/cosmos/cosmos-sdk/x/supply"
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ var (
|
||||||
// initialize the mock application for this module
|
// initialize the mock application for this module
|
||||||
func getMockApp(t *testing.T) *mock.App {
|
func getMockApp(t *testing.T) *mock.App {
|
||||||
mapp, err := getBenchmarkMockApp()
|
mapp, err := getBenchmarkMockApp()
|
||||||
supplytypes.RegisterCodec(mapp.Cdc)
|
supply.RegisterCodec(mapp.Cdc)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
return mapp
|
return mapp
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
|
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
"github.com/cosmos/cosmos-sdk/x/auth"
|
"github.com/cosmos/cosmos-sdk/x/auth"
|
||||||
supplytypes "github.com/cosmos/cosmos-sdk/x/supply/types"
|
"github.com/cosmos/cosmos-sdk/x/supply"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGenesisAccountValidate(t *testing.T) {
|
func TestGenesisAccountValidate(t *testing.T) {
|
||||||
|
@ -28,7 +28,7 @@ func TestGenesisAccountValidate(t *testing.T) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"valid module account",
|
"valid module account",
|
||||||
NewGenesisAccountRaw(addr, sdk.NewCoins(), sdk.NewCoins(), 0, 0, "mint", supplytypes.Minter),
|
NewGenesisAccountRaw(addr, sdk.NewCoins(), sdk.NewCoins(), 0, 0, "mint", supply.Minter),
|
||||||
nil,
|
nil,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -88,10 +88,10 @@ func TestToAccount(t *testing.T) {
|
||||||
require.Equal(t, vacc, acc.(*auth.ContinuousVestingAccount))
|
require.Equal(t, vacc, acc.(*auth.ContinuousVestingAccount))
|
||||||
|
|
||||||
// module account
|
// module account
|
||||||
macc := supplytypes.NewEmptyModuleAccount("mint", supplytypes.Minter)
|
macc := supply.NewEmptyModuleAccount("mint", supply.Minter)
|
||||||
genAcc, err = NewGenesisAccountI(macc)
|
genAcc, err = NewGenesisAccountI(macc)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
acc = genAcc.ToAccount()
|
acc = genAcc.ToAccount()
|
||||||
require.IsType(t, &supplytypes.ModuleAccount{}, acc)
|
require.IsType(t, &supply.ModuleAccount{}, acc)
|
||||||
require.Equal(t, macc, acc.(*supplytypes.ModuleAccount))
|
require.Equal(t, macc, acc.(*supply.ModuleAccount))
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
|
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
"github.com/cosmos/cosmos-sdk/x/auth"
|
"github.com/cosmos/cosmos-sdk/x/auth"
|
||||||
supplytypes "github.com/cosmos/cosmos-sdk/x/supply/types"
|
"github.com/cosmos/cosmos-sdk/x/supply/exported"
|
||||||
)
|
)
|
||||||
|
|
||||||
const msgRoute = "testMsg"
|
const msgRoute = "testMsg"
|
||||||
|
@ -52,7 +52,7 @@ func getMockApp(t *testing.T) *App {
|
||||||
func TestCheckAndDeliverGenTx(t *testing.T) {
|
func TestCheckAndDeliverGenTx(t *testing.T) {
|
||||||
mApp := getMockApp(t)
|
mApp := getMockApp(t)
|
||||||
mApp.Cdc.RegisterConcrete(testMsg{}, "mock/testMsg", nil)
|
mApp.Cdc.RegisterConcrete(testMsg{}, "mock/testMsg", nil)
|
||||||
supplytypes.RegisterCodec(mApp.Cdc)
|
mApp.Cdc.RegisterInterface((*exported.ModuleAccountI)(nil), nil)
|
||||||
|
|
||||||
SetGenesis(mApp, accs)
|
SetGenesis(mApp, accs)
|
||||||
ctxCheck := mApp.BaseApp.NewContext(true, abci.Header{})
|
ctxCheck := mApp.BaseApp.NewContext(true, abci.Header{})
|
||||||
|
@ -92,7 +92,7 @@ func TestCheckAndDeliverGenTx(t *testing.T) {
|
||||||
func TestCheckGenTx(t *testing.T) {
|
func TestCheckGenTx(t *testing.T) {
|
||||||
mApp := getMockApp(t)
|
mApp := getMockApp(t)
|
||||||
mApp.Cdc.RegisterConcrete(testMsg{}, "mock/testMsg", nil)
|
mApp.Cdc.RegisterConcrete(testMsg{}, "mock/testMsg", nil)
|
||||||
supplytypes.RegisterCodec(mApp.Cdc)
|
mApp.Cdc.RegisterInterface((*exported.ModuleAccountI)(nil), nil)
|
||||||
|
|
||||||
SetGenesis(mApp, accs)
|
SetGenesis(mApp, accs)
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
// nolint
|
// nolint
|
||||||
// autogenerated code using github.com/rigelrozanski/multitool
|
// autogenerated code using github.com/rigelrozanski/multitool
|
||||||
// aliases generated for the following subdirectories:
|
// aliases generated for the following subdirectories:
|
||||||
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/supply/keeper
|
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/supply/internal/keeper
|
||||||
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/supply/types
|
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/supply/internal/types
|
||||||
package supply
|
package supply
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/cosmos/cosmos-sdk/x/supply/keeper"
|
"github.com/cosmos/cosmos-sdk/x/supply/internal/keeper"
|
||||||
"github.com/cosmos/cosmos-sdk/x/supply/types"
|
"github.com/cosmos/cosmos-sdk/x/supply/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"github.com/cosmos/cosmos-sdk/codec"
|
"github.com/cosmos/cosmos-sdk/codec"
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
"github.com/cosmos/cosmos-sdk/version"
|
"github.com/cosmos/cosmos-sdk/version"
|
||||||
"github.com/cosmos/cosmos-sdk/x/supply/types"
|
"github.com/cosmos/cosmos-sdk/x/supply/internal/types"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/client/context"
|
"github.com/cosmos/cosmos-sdk/client/context"
|
||||||
"github.com/cosmos/cosmos-sdk/types/rest"
|
"github.com/cosmos/cosmos-sdk/types/rest"
|
||||||
"github.com/cosmos/cosmos-sdk/x/supply/types"
|
"github.com/cosmos/cosmos-sdk/x/supply/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RegisterRoutes registers staking-related REST handlers to a router
|
// RegisterRoutes registers staking-related REST handlers to a router
|
||||||
|
|
|
@ -3,7 +3,7 @@ package supply
|
||||||
import (
|
import (
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
autypes "github.com/cosmos/cosmos-sdk/x/auth"
|
autypes "github.com/cosmos/cosmos-sdk/x/auth"
|
||||||
"github.com/cosmos/cosmos-sdk/x/supply/types"
|
"github.com/cosmos/cosmos-sdk/x/supply/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// InitGenesis sets supply information for genesis.
|
// InitGenesis sets supply information for genesis.
|
||||||
|
|
|
@ -3,7 +3,7 @@ package keeper
|
||||||
import (
|
import (
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
"github.com/cosmos/cosmos-sdk/x/supply/exported"
|
"github.com/cosmos/cosmos-sdk/x/supply/exported"
|
||||||
"github.com/cosmos/cosmos-sdk/x/supply/types"
|
"github.com/cosmos/cosmos-sdk/x/supply/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// GetModuleAddress returns a an address based on the name
|
// GetModuleAddress returns a an address based on the name
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
"github.com/cosmos/cosmos-sdk/x/supply/types"
|
"github.com/cosmos/cosmos-sdk/x/supply/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SendCoinsFromModuleToAccount transfers coins from a ModuleAccount to an AccAddress
|
// SendCoinsFromModuleToAccount transfers coins from a ModuleAccount to an AccAddress
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
"github.com/cosmos/cosmos-sdk/x/supply/types"
|
"github.com/cosmos/cosmos-sdk/x/supply/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
const initialPower = int64(100)
|
const initialPower = int64(100)
|
||||||
|
@ -63,11 +63,12 @@ func TestSendCoins(t *testing.T) {
|
||||||
err = keeper.SendCoinsFromModuleToAccount(ctx, types.Burner, baseAcc.GetAddress(), initCoins)
|
err = keeper.SendCoinsFromModuleToAccount(ctx, types.Burner, baseAcc.GetAddress(), initCoins)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
require.Equal(t, sdk.Coins(nil), getCoinsByName(ctx, keeper, types.Burner))
|
require.Equal(t, sdk.Coins(nil), getCoinsByName(ctx, keeper, types.Burner))
|
||||||
require.Equal(t, initCoins, keeper.bk.GetCoins(ctx, baseAcc.GetAddress()))
|
|
||||||
|
require.Equal(t, initCoins, keeper.ak.GetAccount(ctx, baseAcc.GetAddress()).GetCoins())
|
||||||
|
|
||||||
err = keeper.SendCoinsFromAccountToModule(ctx, baseAcc.GetAddress(), types.Burner, initCoins)
|
err = keeper.SendCoinsFromAccountToModule(ctx, baseAcc.GetAddress(), types.Burner, initCoins)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
require.Equal(t, sdk.Coins(nil), keeper.bk.GetCoins(ctx, baseAcc.GetAddress()))
|
require.Equal(t, sdk.Coins(nil), keeper.ak.GetAccount(ctx, baseAcc.GetAddress()).GetCoins())
|
||||||
require.Equal(t, initCoins, getCoinsByName(ctx, keeper, types.Burner))
|
require.Equal(t, initCoins, getCoinsByName(ctx, keeper, types.Burner))
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
|
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
"github.com/cosmos/cosmos-sdk/x/auth/exported"
|
"github.com/cosmos/cosmos-sdk/x/auth/exported"
|
||||||
"github.com/cosmos/cosmos-sdk/x/supply/types"
|
"github.com/cosmos/cosmos-sdk/x/supply/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RegisterInvariants register all supply invariants
|
// RegisterInvariants register all supply invariants
|
|
@ -7,7 +7,7 @@ import (
|
||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/codec"
|
"github.com/cosmos/cosmos-sdk/codec"
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
"github.com/cosmos/cosmos-sdk/x/supply/types"
|
"github.com/cosmos/cosmos-sdk/x/supply/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Keeper of the supply store
|
// Keeper of the supply store
|
|
@ -2,7 +2,7 @@ package keeper
|
||||||
|
|
||||||
import (
|
import (
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
"github.com/cosmos/cosmos-sdk/x/supply/types"
|
"github.com/cosmos/cosmos-sdk/x/supply/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DefaultCodespace from the supply module
|
// DefaultCodespace from the supply module
|
|
@ -7,7 +7,7 @@ import (
|
||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/client"
|
"github.com/cosmos/cosmos-sdk/client"
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
"github.com/cosmos/cosmos-sdk/x/supply/types"
|
"github.com/cosmos/cosmos-sdk/x/supply/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewQuerier creates a querier for supply REST endpoints
|
// NewQuerier creates a querier for supply REST endpoints
|
|
@ -8,7 +8,7 @@ import (
|
||||||
abci "github.com/tendermint/tendermint/abci/types"
|
abci "github.com/tendermint/tendermint/abci/types"
|
||||||
|
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
"github.com/cosmos/cosmos-sdk/x/supply/types"
|
"github.com/cosmos/cosmos-sdk/x/supply/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestNewQuerier(t *testing.T) {
|
func TestNewQuerier(t *testing.T) {
|
|
@ -16,7 +16,7 @@ import (
|
||||||
"github.com/cosmos/cosmos-sdk/x/auth"
|
"github.com/cosmos/cosmos-sdk/x/auth"
|
||||||
"github.com/cosmos/cosmos-sdk/x/bank"
|
"github.com/cosmos/cosmos-sdk/x/bank"
|
||||||
"github.com/cosmos/cosmos-sdk/x/params"
|
"github.com/cosmos/cosmos-sdk/x/params"
|
||||||
"github.com/cosmos/cosmos-sdk/x/supply/types"
|
"github.com/cosmos/cosmos-sdk/x/supply/internal/types"
|
||||||
|
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
)
|
)
|
|
@ -15,7 +15,6 @@ type AccountKeeper interface {
|
||||||
|
|
||||||
// BankKeeper defines the expected bank keeper (noalias)
|
// BankKeeper defines the expected bank keeper (noalias)
|
||||||
type BankKeeper interface {
|
type BankKeeper interface {
|
||||||
GetCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
|
|
||||||
SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) sdk.Error
|
SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) sdk.Error
|
||||||
DelegateCoins(ctx sdk.Context, fromAdd, toAddr sdk.AccAddress, amt sdk.Coins) sdk.Error
|
DelegateCoins(ctx sdk.Context, fromAdd, toAddr sdk.AccAddress, amt sdk.Coins) sdk.Error
|
||||||
UndelegateCoins(ctx sdk.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) sdk.Error
|
UndelegateCoins(ctx sdk.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) sdk.Error
|
|
@ -14,7 +14,7 @@ import (
|
||||||
"github.com/cosmos/cosmos-sdk/types/module"
|
"github.com/cosmos/cosmos-sdk/types/module"
|
||||||
"github.com/cosmos/cosmos-sdk/x/supply/client/cli"
|
"github.com/cosmos/cosmos-sdk/x/supply/client/cli"
|
||||||
"github.com/cosmos/cosmos-sdk/x/supply/client/rest"
|
"github.com/cosmos/cosmos-sdk/x/supply/client/rest"
|
||||||
"github.com/cosmos/cosmos-sdk/x/supply/types"
|
"github.com/cosmos/cosmos-sdk/x/supply/internal/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
Loading…
Reference in New Issue