Documentation ¶
Overview ¶
Wallets that manage assets in Cartesi Rollups Portals.
Index ¶
- Variables
- func EncodeERC20Withdraw(token common.Address, value *big.Int) []byte
- func EncodeEtherWithdraw(address common.Address, value *big.Int) []byte
- func EtherString(wei *big.Int) string
- type Deposit
- type ERC20Deposit
- type ERC20Wallet
- func (w *ERC20Wallet) Addresses(token common.Address) []common.Address
- func (w *ERC20Wallet) BalanceOf(token common.Address, address common.Address) *big.Int
- func (w *ERC20Wallet) Deposit(payload []byte) (Deposit, []byte, error)
- func (w *ERC20Wallet) Tokens() []common.Address
- func (w *ERC20Wallet) Transfer(token common.Address, src common.Address, dst common.Address, value *big.Int) error
- func (w *ERC20Wallet) Withdraw(token common.Address, address common.Address, value *big.Int) ([]byte, error)
- type EtherDeposit
- type EtherWallet
- func (w *EtherWallet) Addresses() []common.Address
- func (w *EtherWallet) BalanceOf(address common.Address) *big.Int
- func (w *EtherWallet) Deposit(payload []byte) (Deposit, []byte, error)
- func (w *EtherWallet) Transfer(src common.Address, dst common.Address, value *big.Int) error
- func (w *EtherWallet) Withdraw(address common.Address, value *big.Int) ([]byte, error)
- type Wallet
Constants ¶
This section is empty.
Variables ¶
View Source
var MaxUint256 *big.Int
Max value for uint256.
Functions ¶
func EncodeERC20Withdraw ¶
Encode the withdraw request to the portal.
func EncodeEtherWithdraw ¶
Encode the withdraw request to the portal.
Types ¶
type ERC20Deposit ¶
An ERC20 deposit that arrived in the wallet.
func (*ERC20Deposit) GetSender ¶
func (d *ERC20Deposit) GetSender() common.Address
func (*ERC20Deposit) String ¶
func (d *ERC20Deposit) String() string
type ERC20Wallet ¶
type ERC20Wallet struct {
// contains filtered or unexported fields
}
Wallet that manages ERC20 tokens.
func (*ERC20Wallet) Addresses ¶
func (w *ERC20Wallet) Addresses(token common.Address) []common.Address
Return the list of addresses that have assets for the given token.
func (*ERC20Wallet) Deposit ¶
func (w *ERC20Wallet) Deposit(payload []byte) (Deposit, []byte, error)
Handle a deposit from the ERC20 portal.
func (*ERC20Wallet) Tokens ¶
func (w *ERC20Wallet) Tokens() []common.Address
Return the list of tokens with assets.
type EtherDeposit ¶
An Ether deposit that arrived in the wallet.
func (*EtherDeposit) GetSender ¶
func (e *EtherDeposit) GetSender() common.Address
func (*EtherDeposit) String ¶
func (e *EtherDeposit) String() string
type EtherWallet ¶
type EtherWallet struct {
// contains filtered or unexported fields
}
Wallet that manages Ether.
func (*EtherWallet) Addresses ¶
func (w *EtherWallet) Addresses() []common.Address
Return the list of addresses that have assets.
func (*EtherWallet) BalanceOf ¶
func (w *EtherWallet) BalanceOf(address common.Address) *big.Int
Return the balance of the given address.
func (*EtherWallet) Deposit ¶
func (w *EtherWallet) Deposit(payload []byte) (Deposit, []byte, error)
Handle a deposit from the Ether portal.
Click to show internal directories.
Click to hide internal directories.