Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MintableTokenInterface ¶
type MintableTokenInterface interface { Mint(stub shim.ChaincodeStubInterface, args []string, getOwner func(shim.ChaincodeStubInterface) (string, error), getBalanceOf func(shim.ChaincodeStubInterface, []string) (*big.Int, error), getTotalSupply func(shim.ChaincodeStubInterface) (*big.Int, error), ) error }
MintableTokenInterface consists of Mint, this method should be very restricted
type Token ¶
type Token struct{}
Token mintable implements MintableTokenInterface
func (*Token) Mint ¶
func (t *Token) Mint(stub shim.ChaincodeStubInterface, args []string, getOwner func(shim.ChaincodeStubInterface) (string, error), getBalanceOf func(shim.ChaincodeStubInterface, []string) (*big.Int, error), getTotalSupply func(shim.ChaincodeStubInterface) (*big.Int, error), ) error
Mint tokens, add to the `total supply` and `balance` of minter. This function call only be called by token owner.
* `args[0]` - the ID of minter.
* `args[1]` - the mint amount.
* `getOwner` - specifies the function of getting the current owner of token.
* `getBalanceOf` - specifies the function of getting the initial balance of minter.
* `getTotalSupply` - specifies the function of getting the current total supply of tokens.
Click to show internal directories.
Click to hide internal directories.