tokens

package
v2.0.0-b1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: GPL-3.0 Imports: 11 Imported by: 10

Documentation

Index

Constants

View Source
const (
	Erc20AbiString string = `` /* 1089-byte string literal not displayed */

)

Variables

This section is empty.

Functions

This section is empty.

Types

type Erc20Contract

type Erc20Contract struct {
	Details Erc20ContractDetails
	// contains filtered or unexported fields
}

Binding for ERC20 contracts

func NewErc20Contract

func NewErc20Contract(rp *rocketpool.RocketPool, address common.Address, client eth.IExecutionClient, opts *bind.CallOpts) (*Erc20Contract, error)

Creates a contract wrapper for the ERC20 at the given address

func (*Erc20Contract) BalanceOf

func (c *Erc20Contract) BalanceOf(mc *batch.MultiCaller, balance_Out **big.Int, address common.Address)

Get the token balance for an address

func (*Erc20Contract) Transfer

func (c *Erc20Contract) Transfer(to common.Address, amount *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for transferring the ERC20 to another address

type Erc20ContractDetails

type Erc20ContractDetails struct {
	Name     string `json:"name"`
	Symbol   string `json:"symbol"`
	Decimals uint8  `json:"decimals"`
}

Details for ERC20 contracts

type IErc20Token

type IErc20Token interface {
	// The token balance of the given address
	BalanceOf(mc *batch.MultiCaller, balance_Out **big.Int, address common.Address)

	// Transfer tokens to a different address
	Transfer(to common.Address, amount *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)
}

Binding for ERC20 tokens

type TokenReth

type TokenReth struct {
	// The rETH total supply
	TotalSupply *core.SimpleField[*big.Int]

	// The current ETH : rETH exchange rate
	ExchangeRate *core.FormattedUint256Field[float64]

	// The total amount of ETH collateral available for rETH trades
	TotalCollateral *core.SimpleField[*big.Int]

	// The rETH collateralization rate
	CollateralRate *core.FormattedUint256Field[float64]
	// contains filtered or unexported fields
}

Binding for RocketTokenRETH

func NewTokenReth

func NewTokenReth(rp *rocketpool.RocketPool) (*TokenReth, error)

Creates a new TokenReth contract binding

func (*TokenReth) Approve

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

Get info for approving rETH's usage by a spender

func (*TokenReth) BalanceOf

func (c *TokenReth) BalanceOf(mc *batch.MultiCaller, balance_Out **big.Int, address common.Address)

Get the rETH balance of an address

func (*TokenReth) Burn

func (c *TokenReth) Burn(amount *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for burning rETH for ETH

func (*TokenReth) GetAllowance

func (c *TokenReth) GetAllowance(mc *batch.MultiCaller, allowance_Out **big.Int, owner common.Address, spender common.Address)

Get the rETH spending allowance of an address and spender

func (*TokenReth) GetEthValueOfReth

func (c *TokenReth) GetEthValueOfReth(mc *batch.MultiCaller, value_Out **big.Int, rethAmount *big.Int)

Get the ETH value of an amount of rETH

func (*TokenReth) GetRethValueOfEth

func (c *TokenReth) GetRethValueOfEth(mc *batch.MultiCaller, value_Out **big.Int, ethAmount *big.Int)

Get the rETH value of an amount of ETH

func (*TokenReth) Transfer

func (c *TokenReth) Transfer(to common.Address, amount *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for transferring rETH

func (*TokenReth) TransferFrom

func (c *TokenReth) TransferFrom(from common.Address, to common.Address, amount *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for transferring rETH from a sender

type TokenRpl

type TokenRpl struct {
	// The RPL total supply
	TotalSupply *core.SimpleField[*big.Int]

	// The number of seconds in an RPL inflation interval
	InflationInterval *core.FormattedUint256Field[time.Duration]

	// The RPL inflation interval rate
	InflationIntervalRate *core.SimpleField[*big.Int]

	// The time that inflation started for the current interval
	InflationIntervalStartTime *core.FormattedUint256Field[time.Time]
	// contains filtered or unexported fields
}

Binding for RocketTokenRPL

func NewTokenRpl

func NewTokenRpl(rp *rocketpool.RocketPool) (*TokenRpl, error)

Creates a new TokenRpl contract binding

func (*TokenRpl) Approve

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

Get info for approving RPL's usage by a spender

func (*TokenRpl) BalanceOf

func (c *TokenRpl) BalanceOf(mc *batch.MultiCaller, balance_Out **big.Int, address common.Address)

Get the RPL balance of an address

func (*TokenRpl) GetAllowance

func (c *TokenRpl) GetAllowance(mc *batch.MultiCaller, allowance_Out **big.Int, owner common.Address, spender common.Address)

Get the RPL spending allowance of an address and spender

func (*TokenRpl) MintInflationRPL

func (c *TokenRpl) MintInflationRPL(opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for minting new RPL tokens from inflation

func (*TokenRpl) SwapFixedSupplyRplForRpl

func (c *TokenRpl) SwapFixedSupplyRplForRpl(amount *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for swapping fixed-supply RPL for new RPL tokens

func (*TokenRpl) Transfer

func (c *TokenRpl) Transfer(to common.Address, amount *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for transferring RPL

func (*TokenRpl) TransferFrom

func (c *TokenRpl) TransferFrom(from common.Address, to common.Address, amount *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for transferring RPL from a sender

type TokenRplFixedSupply

type TokenRplFixedSupply struct {
	// The fixed-supply RPL total supply
	TotalSupply *core.SimpleField[*big.Int]
	// contains filtered or unexported fields
}

Binding for RocketTokenRPLFixedSupply

func NewTokenRplFixedSupply

func NewTokenRplFixedSupply(rp *rocketpool.RocketPool) (*TokenRplFixedSupply, error)

Creates a new TokenRplFixedSupply contract binding

func (*TokenRplFixedSupply) Approve

func (c *TokenRplFixedSupply) 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

func (*TokenRplFixedSupply) BalanceOf

func (c *TokenRplFixedSupply) BalanceOf(mc *batch.MultiCaller, balance_Out **big.Int, address common.Address)

Get the fixed-supply RPL balance of an address

func (*TokenRplFixedSupply) GetAllowance

func (c *TokenRplFixedSupply) GetAllowance(mc *batch.MultiCaller, allowance_Out **big.Int, owner common.Address, spender common.Address)

Get the fixed-supply RPL spending allowance of an address and spender

func (*TokenRplFixedSupply) Transfer

func (c *TokenRplFixedSupply) Transfer(to common.Address, amount *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for transferring fixed-supply RPL

func (*TokenRplFixedSupply) TransferFrom

func (c *TokenRplFixedSupply) TransferFrom(from common.Address, to common.Address, amount *big.Int, opts *bind.TransactOpts) (*eth.TransactionInfo, error)

Get info for transferring fixed-supply RPL from a sender

type TokenRplFixedSupplyDetails

type TokenRplFixedSupplyDetails struct {
}

Details for RocketTokenRPLFixedSupply

Jump to

Keyboard shortcuts

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