Documentation ¶
Index ¶
- Variables
- func AddPercents(gasLimitUnits uint64, percents int) *big.Int
- func BurnWZCN(ctx context.Context, amountTokens int64) (*types.Transaction, error)
- func BurnZCN(ctx context.Context, value int64) (*transaction.Transaction, error)
- func ConfirmEthereumTransaction(hash string, times int, duration time.Duration) (int, error)
- func GetTransactionStatus(hash string) (int, error)
- func IncreaseBurnerAllowance(ctx context.Context, amountWei wei) (*types.Transaction, error)
- func InitBridge()
- func MintWZCN(ctx context.Context, amountTokens wei, payload *ethereum.MintPayload) (*types.Transaction, error)
- func MintZCN(ctx context.Context, payload *zcnsc.MintPayload) (*transaction.Transaction, error)
Constants ¶
This section is empty.
Variables ¶
var ( DefaultClientIDEncoder = func(id string) []byte { return []byte(id) } )
Functions ¶
func BurnWZCN ¶
BurnWZCN Burns WZCN tokens on behalf of the 0ZCN client amountTokens - ZCN tokens clientID - 0ZCN client ERC20 signature: "burn(uint256,bytes)"
func BurnZCN ¶
func BurnZCN(ctx context.Context, value int64) (*transaction.Transaction, error)
func GetTransactionStatus ¶
func IncreaseBurnerAllowance ¶
func IncreaseBurnerAllowance(ctx context.Context, amountWei wei) (*types.Transaction, error)
IncreaseBurnerAllowance Increases allowance for bridge contract address to transfer WZCN tokens on behalf of the token owner to the Burn TokenPool During the burn the script transfers amount from token owner to the bridge burn token pool Example: owner wants to burn some amount. The contract will transfer some amount from owner address to the pool. So the owner must call IncreaseAllowance of the WZCN token with 2 parameters: spender address which is the bridge contract and amount to be burned (transferred) ERC20 signature: "increaseAllowance(address,uint256)"
func InitBridge ¶
func InitBridge()
InitBridge Sets up the wallet and node Wallet setup reads keys from keyfile and registers in the 0chain
func MintWZCN ¶
func MintWZCN(ctx context.Context, amountTokens wei, payload *ethereum.MintPayload) (*types.Transaction, error)
MintWZCN Mint ZCN tokens on behalf of the 0ZCN client amountTokens: ZCN tokens payload: received from authorizers
func MintZCN ¶
func MintZCN(ctx context.Context, payload *zcnsc.MintPayload) (*transaction.Transaction, error)
Types ¶
This section is empty.