2019-06-28 13:11:27 -07:00
|
|
|
package exported
|
|
|
|
|
2019-08-01 11:56:50 -07:00
|
|
|
import (
|
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
|
|
|
|
"github.com/cosmos/cosmos-sdk/x/auth/exported"
|
|
|
|
)
|
2019-06-28 13:11:27 -07:00
|
|
|
|
2020-02-18 04:50:13 -08: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-08-01 11:56:50 -07:00
|
|
|
|
2019-06-28 13:11:27 -07:00
|
|
|
GetName() string
|
2019-07-06 12:42:06 -07:00
|
|
|
GetPermissions() []string
|
|
|
|
HasPermission(string) bool
|
2019-06-28 13:11:27 -07:00
|
|
|
}
|
2019-08-01 11:56:50 -07:00
|
|
|
|
|
|
|
// SupplyI defines an inflationary supply interface for modules that handle
|
|
|
|
// token supply.
|
|
|
|
type SupplyI interface {
|
|
|
|
GetTotal() sdk.Coins
|
2020-02-18 04:50:13 -08:00
|
|
|
SetTotal(total sdk.Coins)
|
2019-08-01 11:56:50 -07:00
|
|
|
|
2020-02-18 04:50:13 -08:00
|
|
|
Inflate(amount sdk.Coins)
|
|
|
|
Deflate(amount sdk.Coins)
|
2019-08-01 11:56:50 -07:00
|
|
|
|
|
|
|
String() string
|
|
|
|
ValidateBasic() error
|
|
|
|
}
|