ethereum

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ETH

type ETH struct {
	Exchange *Exchange
	Token    *Token
}

func (*ETH) New

func (e *ETH) New(user base.BaseUser, signer bind.SignerFn, client *ethclient.Client) *ETH

type ETHClient

type ETHClient struct {
	base.BaseUser
	// contains filtered or unexported fields
}

type Exchange

type Exchange struct {
	ETHClient
	// contains filtered or unexported fields
}

func (*Exchange) Deposit

func (e *Exchange) Deposit(amount *big.Int, publicKey string, positionId *big.Int, transact *bind.TransactOpts) (*types.Transaction, error)

func (*Exchange) DepositAsMessage added in v0.3.2

func (e *Exchange) DepositAsMessage(amount *big.Int, publicKey string, positionId *big.Int) (to common.Address, payload []byte, err error)

func (*Exchange) GetWithdrawalBalance

func (e *Exchange) GetWithdrawalBalance(publicKey string) (*big.Int, error)

func (*Exchange) New

func (e *Exchange) New(c ETHClient) *Exchange

func (*Exchange) RegisterUser

func (e *Exchange) RegisterUser(signature []byte, publicKey string, transact *bind.TransactOpts) (*types.Transaction, error)

func (*Exchange) RegisterUserAsMessage added in v0.3.2

func (e *Exchange) RegisterUserAsMessage(signature []byte, publicKey string) (to common.Address, payload []byte, err error)

func (*Exchange) Withdraw

func (e *Exchange) Withdraw(publicKey string, transact *bind.TransactOpts) (*types.Transaction, error)

func (*Exchange) WithdrawAsMessage added in v0.3.2

func (e *Exchange) WithdrawAsMessage(publicKey string) (to common.Address, payload []byte, err error)

type Token

type Token struct {
	ETHClient
	// contains filtered or unexported fields
}

func (*Token) GetAddress added in v0.3.3

func (t *Token) GetAddress() string

func (*Token) GetAllowance

func (t *Token) GetAllowance() (*big.Int, error)

func (*Token) GetContract added in v0.1.7

func (t *Token) GetContract() *abi.Erc20

func (*Token) New

func (t *Token) New(e ETHClient) *Token

func (*Token) SetAllowance

func (t *Token) SetAllowance(amount *big.Int, transact *bind.TransactOpts) (*types.Transaction, error)

func (*Token) SetAllowanceAsMessage added in v0.3.2

func (t *Token) SetAllowanceAsMessage(amount *big.Int) (to common.Address, payload []byte, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL