contracts

package
v1.0.0-b1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CasperDeposit

type CasperDeposit struct {
	Address common.Address
	// contains filtered or unexported fields
}

func NewCasperDeposit

func NewCasperDeposit(address common.Address, ec eth.IExecutionClient, txMgr *eth.TransactionManager) (*CasperDeposit, error)

Create a new CasperDeposit instance

func (*CasperDeposit) Deposit

func (c *CasperDeposit) Deposit(pubkey beacon.ValidatorPubkey, withdrawalCredentials common.Hash, signature beacon.ValidatorSignature, depositDataRoot common.Hash, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

type IErc4626Token

type IErc4626Token interface {
	contracts.IErc20Token

	// The address of the underlying asset token managed by the vault
	Asset() contracts.IErc20Token

	// Converts a number of underlying assets to an equivalent amount of vault shares.
	// This is effectively the "price" of the shares, in terms of the share:asset ratio.
	ConvertToShares(mc *batch.MultiCaller, out **big.Int, assets *big.Int)

	// Converts a number of vault shares to an equivalent amount of underyling asset.
	// This is effectively the "price" of the asset, in terms of the asset:share ratio.
	ConvertToAssets(mc *batch.MultiCaller, out **big.Int, shares *big.Int)

	// Deposits exactly `assets` of underlying tokens into the vault and sends the corresponding amount of vault shares to `receiver`
	Deposit(assets *big.Int, receiver common.Address, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

	// Burns exactly `shares` from `owner` and sends the corresponding amount of underlying tokens to `receiver`
	Redeem(shares *big.Int, receiver common.Address, owner common.Address, opts *bind.TransactOpts) (*eth.TransactionInfo, error)
}

Simple binding for ERC4626 tokens. See https://eips.ethereum.org/EIPS/eip-4626 for details.

func NewErc4626Token

func NewErc4626Token(address common.Address, ec eth.IExecutionClient, qMgr *eth.QueryManager, txMgr *eth.TransactionManager, opts *bind.CallOpts) (IErc4626Token, error)

Create a new Erc4626Token instance

type Weth

type Weth struct {
	contracts.IErc20Token
	Address common.Address
	// contains filtered or unexported fields
}

func NewWeth

func NewWeth(address common.Address, ec eth.IExecutionClient, qMgr *eth.QueryManager, txMgr *eth.TransactionManager, opts *bind.CallOpts) (*Weth, error)

Create a new Weth instance

func (*Weth) Approve

func (c *Weth) Approve(spender common.Address, amount *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for approving fixed-supply RPL's usage by a spender TEMP: move into IERC20Token

func (*Weth) Deposit

func (c *Weth) Deposit(opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Deposit an amount of ETH and receive WETH in return

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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