Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BurnableTokenInterface ¶
type BurnableTokenInterface interface { Burn(stub shim.ChaincodeStubInterface, args []string, getTotalSupply func(stub shim.ChaincodeStubInterface) (*big.Int, error), getBalanceOf func(stub shim.ChaincodeStubInterface, args []string) (*big.Int, error), ) error BurnFrom(stub shim.ChaincodeStubInterface, args []string, getAllowance func(stub shim.ChaincodeStubInterface, args []string) (*big.Int, error), getTotalSupply func(stub shim.ChaincodeStubInterface) (*big.Int, error), getBalanceOf func(stub shim.ChaincodeStubInterface, args []string) (*big.Int, error), ) error }
BurnableTokenInterface consists of Burn & BurnFrom
type Token ¶
type Token struct{}
Token burnable implementation of BurnableTokenInterface
func (*Token) Burn ¶
func (t *Token) Burn(stub shim.ChaincodeStubInterface, args []string, getTotalSupply func(stub shim.ChaincodeStubInterface) (*big.Int, error), getBalanceOf func(stub shim.ChaincodeStubInterface, args []string) (*big.Int, error), ) error
Burn destroys an amount of tokens of the invoking identity, and total supply.
* `args[0]` - the amount that will be burnt
func (*Token) BurnFrom ¶
func (t *Token) BurnFrom(stub shim.ChaincodeStubInterface, args []string, getAllowance func(stub shim.ChaincodeStubInterface, args []string) (*big.Int, error), getTotalSupply func(stub shim.ChaincodeStubInterface) (*big.Int, error), getBalanceOf func(stub shim.ChaincodeStubInterface, args []string) (*big.Int, error), ) error
BurnFrom burns a specific amount of tokens from the target identity and total supply, the chaincode invoker must have sufficient allowance from burnee.
* `args[0]` - the ID of burnee.
* `args[1]` - the burn amount.
Click to show internal directories.
Click to hide internal directories.