cosmos-sdk/x/supply/exported/exported.go

31 lines
606 B
Go
Raw Normal View History

2019-06-28 13:11:27 -07:00
package exported
import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/exported"
)
2019-06-28 13:11:27 -07:00
// ModuleAccountI defines an account interface for modules that hold tokens in
// an escrow.
2019-06-28 13:11:27 -07:00
type ModuleAccountI interface {
exported.Account
2019-06-28 13:11:27 -07:00
GetName() string
GetPermissions() []string
HasPermission(string) bool
2019-06-28 13:11:27 -07:00
}
// SupplyI defines an inflationary supply interface for modules that handle
// token supply.
type SupplyI interface {
GetTotal() sdk.Coins
SetTotal(total sdk.Coins)
Inflate(amount sdk.Coins)
Deflate(amount sdk.Coins)
String() string
ValidateBasic() error
}