Documentation ¶
Index ¶
- Variables
- type Wallet
- func (w *Wallet) ChangeMerchant(ctx context.Context, to common.Address) (txHash common.Hash, err error)
- func (w *Wallet) WithdrawAllTo(ctx context.Context, depositAddress common.Address, minAmount *big.Int) (txHash common.Hash, err error)
- func (w *Wallet) WithdrawAllTokensTo(ctx context.Context, tokenAddress common.Address, ...) (txHash common.Hash, err error)
- func (w *Wallet) WithdrawTo(ctx context.Context, depositAddress common.Address, amount *big.Int) (txHash common.Hash, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrContractNotFound error returned when MerchantWalletContract could not be instantiated on the given address ErrContractNotFound = errors.New("wallet: MerchantWallet contract not found") //ErrAlwaysFailingTransaction error returned when Transaction could not be submitted to blockchain ErrAlwaysFailingTransaction = errors.New("wallet: could not submit a transaction. Gas limit exceeds limits or always failing transaction") )
Functions ¶
This section is empty.
Types ¶
type Wallet ¶
type Wallet struct { *eth.Session ContractAddress common.Address ContractHandler *contracts.MerchantWalletContract }
Wallet executes methods necessary for fund management in MerchantWallet
func (*Wallet) ChangeMerchant ¶
func (w *Wallet) ChangeMerchant(ctx context.Context, to common.Address) (txHash common.Hash, err error)
ChangeMerchant passes the administration of the MerchantWallet contract to another Address
func (*Wallet) WithdrawAllTo ¶
func (w *Wallet) WithdrawAllTo(ctx context.Context, depositAddress common.Address, minAmount *big.Int) (txHash common.Hash, err error)
WithdrawAllTo withdraws all balance or minAmount to a provided deposit address
Click to show internal directories.
Click to hide internal directories.