Documentation ¶
Index ¶
- type Keeper
- func (k Keeper) Allowance(ctx sdk.Context, owner string, spender string) (int64, error)
- func (k Keeper) Approve(ctx sdk.Context, owner string, spender string, amount int64) (err error)
- func (k Keeper) BalanceOf(ctx sdk.Context, account string) (int64, error)
- func (k Keeper) Burn(ctx sdk.Context, account string, amount int64) error
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) InitGenesis(ctx sdk.Context, state types.GenesisState)
- func (k Keeper) Mint(ctx sdk.Context, account string, amount int64) error
- func (k Keeper) TotalSupply(ctx sdk.Context) (int64, error)
- func (k Keeper) Transfer(ctx sdk.Context, spender, recipient string, amount int64) error
- func (k Keeper) TransferFrom(ctx sdk.Context, owner string, spender string, recipient string, amount int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper implements ERC20 token contract using CDT store Each function can be performed in concurrency under specific conditions using the operations provided by CDT.
func NewKeeper ¶
func NewKeeper(store cdtkeeper.Int64Store) Keeper
NewKeeper creates a new keeper instance
func (Keeper) Allowance ¶
Allowance Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default.
func (Keeper) Approve ¶
Approve sets `amount` as the allowance of `spender` over the caller's tokens.
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis exports bridge module's portID and denom trace info into its genesis state.
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, state types.GenesisState)
InitGenesis initializes the bridge module state and binds to PortID.
func (Keeper) Mint ¶
Mint creates `amount` tokens and assigns them to `account`, increasing the total supply.
func (Keeper) TotalSupply ¶
TotalSupply returns the amount of tokens in existence.