Documentation ¶
Index ¶
- Constants
- func DecodeAbi(abiEncoded string) (*abi.ABI, error)
- func EncodeAbiStr(abiStr string) (string, error)
- type Contract
- func (c *Contract) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error
- func (c *Contract) GetTransactionEvents(txReceipt *types.Receipt, eventName string, eventPrototype interface{}) ([]interface{}, error)
- func (c *Contract) GetTransactionGasInfo(opts *bind.TransactOpts, method string, params ...interface{}) (GasInfo, error)
- func (c *Contract) GetTransferGasInfo(opts *bind.TransactOpts) (GasInfo, error)
- func (c *Contract) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (common.Hash, error)
- func (c *Contract) Transfer(opts *bind.TransactOpts) (common.Hash, error)
- type GasInfo
- type RocketPool
- func (rp *RocketPool) GetABI(contractName string) (*abi.ABI, error)
- func (rp *RocketPool) GetABIs(contractNames ...string) ([]*abi.ABI, error)
- func (rp *RocketPool) GetAddress(contractName string) (*common.Address, error)
- func (rp *RocketPool) GetAddresses(contractNames ...string) ([]*common.Address, error)
- func (rp *RocketPool) GetContract(contractName string) (*Contract, error)
- func (rp *RocketPool) GetContracts(contractNames ...string) ([]*Contract, error)
- func (rp *RocketPool) MakeContract(contractName string, address common.Address) (*Contract, error)
Constants ¶
View Source
const ( GasLimitMultiplier float64 = 1.5 MaxGasLimit = 12000000 )
Transaction settings
View Source
const CacheTTL = 300 // 5 minutes
Cache settings
Variables ¶
This section is empty.
Functions ¶
func EncodeAbiStr ¶
zlib-compress and base64-encode an ABI JSON string
Types ¶
type Contract ¶
type Contract struct { Contract *bind.BoundContract Address *common.Address ABI *abi.ABI Client *client.EthClientProxy }
Contract type wraps go-ethereum bound contract
func (*Contract) Call ¶
func (c *Contract) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error
Call a contract method
func (*Contract) GetTransactionEvents ¶
func (c *Contract) GetTransactionEvents(txReceipt *types.Receipt, eventName string, eventPrototype interface{}) ([]interface{}, error)
Get contract events from a transaction eventPrototype must be an event struct type Returns a slice of untyped values; assert returned events to event struct type
func (*Contract) GetTransactionGasInfo ¶
func (c *Contract) GetTransactionGasInfo(opts *bind.TransactOpts, method string, params ...interface{}) (GasInfo, error)
Get Gas Limit for transaction
func (*Contract) GetTransferGasInfo ¶
func (c *Contract) GetTransferGasInfo(opts *bind.TransactOpts) (GasInfo, error)
Get gas limit for a transfer call
type GasInfo ¶
type GasInfo struct { EstGasLimit uint64 `json:"estGasLimit"` SafeGasLimit uint64 `json:"safeGasLimit"` }
Response for gas limits from network and from user request
type RocketPool ¶
type RocketPool struct { Client *client.EthClientProxy RocketStorage *contracts.RocketStorage RocketStorageContract *Contract // contains filtered or unexported fields }
Rocket Pool contract manager
func NewRocketPool ¶
func NewRocketPool(client *client.EthClientProxy, rocketStorageAddress common.Address) (*RocketPool, error)
Create new contract manager
func (*RocketPool) GetABI ¶
func (rp *RocketPool) GetABI(contractName string) (*abi.ABI, error)
Load Rocket Pool contract ABIs
func (*RocketPool) GetABIs ¶
func (rp *RocketPool) GetABIs(contractNames ...string) ([]*abi.ABI, error)
func (*RocketPool) GetAddress ¶
func (rp *RocketPool) GetAddress(contractName string) (*common.Address, error)
Load Rocket Pool contract addresses
func (*RocketPool) GetAddresses ¶
func (rp *RocketPool) GetAddresses(contractNames ...string) ([]*common.Address, error)
func (*RocketPool) GetContract ¶
func (rp *RocketPool) GetContract(contractName string) (*Contract, error)
Load Rocket Pool contracts
func (*RocketPool) GetContracts ¶
func (rp *RocketPool) GetContracts(contractNames ...string) ([]*Contract, error)
func (*RocketPool) MakeContract ¶
Create a Rocket Pool contract instance
Click to show internal directories.
Click to hide internal directories.