Skip to content

tokens

go
import "github.com/rocket-pool/rocketpool-go/tokens"

Index

func ApproveFixedSupplyRPL

go
func ApproveFixedSupplyRPL(rp *rocketpool.RocketPool, spender common.Address, amount *big.Int, opts *bind.TransactOpts) (common.Hash, error)

Approve an fixed-supply RPL spender

func ApproveRETH

go
func ApproveRETH(rp *rocketpool.RocketPool, spender common.Address, amount *big.Int, opts *bind.TransactOpts) (common.Hash, error)

Approve a rETH spender

func ApproveRPL

go
func ApproveRPL(rp *rocketpool.RocketPool, spender common.Address, amount *big.Int, opts *bind.TransactOpts) (common.Hash, error)

Approve an RPL spender

func BurnRETH

go
func BurnRETH(rp *rocketpool.RocketPool, amount *big.Int, opts *bind.TransactOpts) (common.Hash, error)

Burn rETH for ETH

func EstimateApproveFixedSupplyRPLGas

go
func EstimateApproveFixedSupplyRPLGas(rp *rocketpool.RocketPool, spender common.Address, amount *big.Int, opts *bind.TransactOpts) (rocketpool.GasInfo, error)

Estimate the gas of ApproveFixedSupplyRPL

func EstimateApproveRETHGas

go
func EstimateApproveRETHGas(rp *rocketpool.RocketPool, spender common.Address, amount *big.Int, opts *bind.TransactOpts) (rocketpool.GasInfo, error)

Estimate the gas of ApproveRETH

func EstimateApproveRPLGas

go
func EstimateApproveRPLGas(rp *rocketpool.RocketPool, spender common.Address, amount *big.Int, opts *bind.TransactOpts) (rocketpool.GasInfo, error)

Estimate the gas of ApproveRPL

func EstimateBurnRETHGas

go
func EstimateBurnRETHGas(rp *rocketpool.RocketPool, amount *big.Int, opts *bind.TransactOpts) (rocketpool.GasInfo, error)

Estimate the gas of BurnRETH

func EstimateMintInflationRPLGas

go
func EstimateMintInflationRPLGas(rp *rocketpool.RocketPool, opts *bind.TransactOpts) (rocketpool.GasInfo, error)

Estimate the gas of MintInflationRPL

func EstimateSwapFixedSupplyRPLForRPLGas

go
func EstimateSwapFixedSupplyRPLForRPLGas(rp *rocketpool.RocketPool, amount *big.Int, opts *bind.TransactOpts) (rocketpool.GasInfo, error)

Estimate the gas of SwapFixedSupplyRPLForRPL

func EstimateTransferFixedSupplyRPLGas

go
func EstimateTransferFixedSupplyRPLGas(rp *rocketpool.RocketPool, to common.Address, amount *big.Int, opts *bind.TransactOpts) (rocketpool.GasInfo, error)

Estimate the gas of TransferFixedSupplyRPL

func EstimateTransferFromFixedSupplyRPLGas

go
func EstimateTransferFromFixedSupplyRPLGas(rp *rocketpool.RocketPool, from, to common.Address, amount *big.Int, opts *bind.TransactOpts) (rocketpool.GasInfo, error)

Estimate the gas of TransferFromFixedSupplyRPL

func EstimateTransferFromRETHGas

go
func EstimateTransferFromRETHGas(rp *rocketpool.RocketPool, from, to common.Address, amount *big.Int, opts *bind.TransactOpts) (rocketpool.GasInfo, error)

Estimate the gas of TransferFromRETH

func EstimateTransferFromRPLGas

go
func EstimateTransferFromRPLGas(rp *rocketpool.RocketPool, from, to common.Address, amount *big.Int, opts *bind.TransactOpts) (rocketpool.GasInfo, error)

Estimate the gas of TransferFromRPL

func EstimateTransferRETHGas

go
func EstimateTransferRETHGas(rp *rocketpool.RocketPool, to common.Address, amount *big.Int, opts *bind.TransactOpts) (rocketpool.GasInfo, error)

Estimate the gas of TransferRETH

func EstimateTransferRPLGas

go
func EstimateTransferRPLGas(rp *rocketpool.RocketPool, to common.Address, amount *big.Int, opts *bind.TransactOpts) (rocketpool.GasInfo, error)

Estimate the gas of TransferRPL

func GetETHValueOfRETH

go
func GetETHValueOfRETH(rp *rocketpool.RocketPool, rethAmount *big.Int, opts *bind.CallOpts) (*big.Int, error)

Get the ETH value of an amount of rETH

func GetFixedSupplyRPLAllowance

go
func GetFixedSupplyRPLAllowance(rp *rocketpool.RocketPool, owner, spender common.Address, opts *bind.CallOpts) (*big.Int, error)

Get fixed-supply RPL allowance

func GetFixedSupplyRPLBalance

go
func GetFixedSupplyRPLBalance(rp *rocketpool.RocketPool, address common.Address, opts *bind.CallOpts) (*big.Int, error)

Get fixed-supply RPL balance

func GetFixedSupplyRPLTotalSupply

go
func GetFixedSupplyRPLTotalSupply(rp *rocketpool.RocketPool, opts *bind.CallOpts) (*big.Int, error)

Get fixed-supply RPL total supply

func GetRETHAllowance

go
func GetRETHAllowance(rp *rocketpool.RocketPool, owner, spender common.Address, opts *bind.CallOpts) (*big.Int, error)

Get rETH allowance

func GetRETHBalance

go
func GetRETHBalance(rp *rocketpool.RocketPool, address common.Address, opts *bind.CallOpts) (*big.Int, error)

Get rETH balance

func GetRETHCollateralRate

go
func GetRETHCollateralRate(rp *rocketpool.RocketPool, opts *bind.CallOpts) (float64, error)

Get the rETH collateralization rate

func GetRETHContractETHBalance

go
func GetRETHContractETHBalance(rp *rocketpool.RocketPool, opts *bind.CallOpts) (*big.Int, error)

Get the rETH contract ETH balance

func GetRETHExchangeRate

go
func GetRETHExchangeRate(rp *rocketpool.RocketPool, opts *bind.CallOpts) (float64, error)

Get the current ETH : rETH exchange rate

func GetRETHTotalCollateral

go
func GetRETHTotalCollateral(rp *rocketpool.RocketPool, opts *bind.CallOpts) (*big.Int, error)

Get the total amount of ETH collateral available for rETH trades

func GetRETHTotalSupply

go
func GetRETHTotalSupply(rp *rocketpool.RocketPool, opts *bind.CallOpts) (*big.Int, error)

Get rETH total supply

func GetRETHValueOfETH

go
func GetRETHValueOfETH(rp *rocketpool.RocketPool, ethAmount *big.Int, opts *bind.CallOpts) (*big.Int, error)

Get the rETH value of an amount of ETH

func GetRPLAllowance

go
func GetRPLAllowance(rp *rocketpool.RocketPool, owner, spender common.Address, opts *bind.CallOpts) (*big.Int, error)

Get RPL allowance

func GetRPLBalance

go
func GetRPLBalance(rp *rocketpool.RocketPool, address common.Address, opts *bind.CallOpts) (*big.Int, error)

Get RPL balance

func GetRPLInflationIntervalRate

go
func GetRPLInflationIntervalRate(rp *rocketpool.RocketPool, opts *bind.CallOpts) (*big.Int, error)

Get the RPL inflation interval rate

func GetRPLTotalSupply

go
func GetRPLTotalSupply(rp *rocketpool.RocketPool, opts *bind.CallOpts) (*big.Int, error)

Get RPL total supply

func MintInflationRPL

go
func MintInflationRPL(rp *rocketpool.RocketPool, opts *bind.TransactOpts) (common.Hash, error)

Mint new RPL tokens from inflation

func SwapFixedSupplyRPLForRPL

go
func SwapFixedSupplyRPLForRPL(rp *rocketpool.RocketPool, amount *big.Int, opts *bind.TransactOpts) (common.Hash, error)

Swap fixed-supply RPL for new RPL tokens

func TransferFixedSupplyRPL

go
func TransferFixedSupplyRPL(rp *rocketpool.RocketPool, to common.Address, amount *big.Int, opts *bind.TransactOpts) (common.Hash, error)

Transfer fixed-supply RPL

func TransferFromFixedSupplyRPL

go
func TransferFromFixedSupplyRPL(rp *rocketpool.RocketPool, from, to common.Address, amount *big.Int, opts *bind.TransactOpts) (common.Hash, error)

Transfer fixed-supply RPL from a sender

func TransferFromRETH

go
func TransferFromRETH(rp *rocketpool.RocketPool, from, to common.Address, amount *big.Int, opts *bind.TransactOpts) (common.Hash, error)

Transfer rETH from a sender

func TransferFromRPL

go
func TransferFromRPL(rp *rocketpool.RocketPool, from, to common.Address, amount *big.Int, opts *bind.TransactOpts) (common.Hash, error)

Transfer RPL from a sender

func TransferRETH

go
func TransferRETH(rp *rocketpool.RocketPool, to common.Address, amount *big.Int, opts *bind.TransactOpts) (common.Hash, error)

Transfer rETH

func TransferRPL

go
func TransferRPL(rp *rocketpool.RocketPool, to common.Address, amount *big.Int, opts *bind.TransactOpts) (common.Hash, error)

Transfer RPL

type Balances

Token balances

go
type Balances struct {
    ETH            *big.Int `json:"eth"`
    RETH           *big.Int `json:"reth"`
    RPL            *big.Int `json:"rpl"`
    FixedSupplyRPL *big.Int `json:"fixedSupplyRpl"`
}

func GetBalances

go
func GetBalances(rp *rocketpool.RocketPool, address common.Address, opts *bind.CallOpts) (Balances, error)

Get token balances of an address