deposits

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ERC20Deposit

type ERC20Deposit struct {
	Amount       string
	TokenAddress string
}

ERC20Deposit implements TokenDeposit. Used to deposit ERC20 Tokens.

func NewERC20Deposit

func NewERC20Deposit(amount, tokenAddress string) *ERC20Deposit

NewERC20Deposit instantiates a new ERC20Deposit object with given amount and tokenAddress.

func (*ERC20Deposit) Deposit

func (d *ERC20Deposit) Deposit(ctx context.Context, ethClient *ethereumutil.Client, clientAPI *api.APIClient, l1signer signers.L1Signer) (*eth.Transaction, error)

Deposit performs the deposit workflow on the ERC20Deposit.

type ERC721Deposit

type ERC721Deposit struct {
	TokenID      string
	TokenAddress string
}

ERC721Deposit implements TokenDeposit. Used to deposit ERC721 Tokens.

func NewERC721Deposit

func NewERC721Deposit(tokenID, tokenAddress string) *ERC721Deposit

NewERC721Deposit instantiates a new ERC721Deposit object with given tokenID and tokenAddress.

func (*ERC721Deposit) Deposit

func (d *ERC721Deposit) Deposit(ctx context.Context, ethClient *ethereumutil.Client, clientAPI *api.APIClient, l1signer signers.L1Signer) (*eth.Transaction, error)

Deposit performs the deposit workflow on the ERC721Deposit.

type ETHDeposit

type ETHDeposit struct {
	Amount string
}

ETHDeposit implements TokenDeposit. Used to deposit Eth Tokens.

func NewETHDeposit

func NewETHDeposit(amount string) *ETHDeposit

NewETHDeposit instantiates a new ETHDeposit object with the given amount.

func (*ETHDeposit) Deposit

func (d *ETHDeposit) Deposit(ctx context.Context, ethClient *ethereumutil.Client, clientAPI *api.APIClient, l1signer signers.L1Signer) (*eth.Transaction, error)

Deposit performs the deposit workflow on the ETHDeposit.

type TokenDeposit

type TokenDeposit interface {
	Deposit(ctx context.Context, ethClient *ethereumutil.Client, clientAPI *api.APIClient, l1signer signers.L1Signer) (*eth.Transaction, error)
}

Jump to

Keyboard shortcuts

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