Documentation ¶
Overview ¶
Package rpc provides high level access to the Fantom Opera blockchain node through RPC interface.
Package rpc provides high level access to the Fantom Opera blockchain node through RPC interface.
Index ¶
- Constants
- type Rpc
- func (rpc *Rpc) Block(numTag *string) (*types.Block, error)
- func (rpc *Rpc) BlockByHash(hash *string) (*types.Block, error)
- func (rpc *Rpc) BlockHeight() (*hexutil.Big, error)
- func (rpc *Rpc) CompleteWithdrawal(projectId uint64, epoch uint64, amount *big.Int) error
- func (rpc *Rpc) GasMonetizationAbi() *abi.ABI
- func (rpc *Rpc) GasMonetizationAddress() common.Address
- func (rpc *Rpc) HasPendingWithdrawal(projectId uint64, epoch uint64) (bool, error)
- func (rpc *Rpc) SetDataProviderSession(session *contracts.GasMonetizationSession)
- func (rpc *Rpc) SetGasMonetizationAddress(addr common.Address)
- func (rpc *Rpc) StartFromBlock() uint64
- func (rpc *Rpc) Transaction(hash *common.Hash) (*types.Transaction, error)
Constants ¶
const (
BlockTypeLatest = "latest"
)
BlockTypeLatest represents the latest available block in blockchain.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rpc ¶
type Rpc struct {
// contains filtered or unexported fields
}
Rpc represents the implementation of the Blockchain interface for Fantom Opera node.
func (*Rpc) Block ¶
Block returns information about a blockchain block by encoded hex number, or by a type tag. For tag based loading use predefined BlockType contacts.
func (*Rpc) BlockByHash ¶
BlockByHash returns information about a blockchain block by hash.
func (*Rpc) BlockHeight ¶
BlockHeight returns the current block height of the Opera blockchain.
func (*Rpc) CompleteWithdrawal ¶
CompleteWithdrawal completes withdrawal of the given amount from the given project.
func (*Rpc) GasMonetizationAbi ¶
GasMonetizationAbi provides access to decoded ABI of Fantom Gas Monetization contract.
func (*Rpc) GasMonetizationAddress ¶
GasMonetizationAddress returns the address of the gas monetization contract.
func (*Rpc) HasPendingWithdrawal ¶
HasPendingWithdrawal returns true if there is a pending withdrawal for the given project.
func (*Rpc) SetDataProviderSession ¶
func (rpc *Rpc) SetDataProviderSession(session *contracts.GasMonetizationSession)
SetDataProviderSession sets the data provider session. This is intended to be used only for testing purposes.
func (*Rpc) SetGasMonetizationAddress ¶
SetGasMonetizationAddress sets the address of the gas monetization contract. This is used for testing purposes only.
func (*Rpc) StartFromBlock ¶
StartFromBlock returns the block number from which the processing should start.
func (*Rpc) Transaction ¶
Transaction returns information about a blockchain transaction by hash.