Documentation ¶
Index ¶
- Variables
- type ArbConnection
- func (conn *ArbConnection) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
- func (conn *ArbConnection) CodeAt(ctx context.Context, contract ethcommon.Address, blockNumber *big.Int) ([]byte, error)
- func (conn *ArbConnection) EstimateGas(ctx context.Context, call ethereum.CallMsg) (uint64, error)
- func (conn *ArbConnection) FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error)
- func (conn *ArbConnection) PendingCallContract(ctx context.Context, call ethereum.CallMsg) ([]byte, error)
- func (conn *ArbConnection) PendingCodeAt(ctx context.Context, account ethcommon.Address) ([]byte, error)
- func (conn *ArbConnection) PendingNonceAt(ctx context.Context, account ethcommon.Address) (uint64, error)
- func (conn *ArbConnection) SendTransaction(ctx context.Context, tx *types.Transaction) error
- func (conn *ArbConnection) SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
- func (conn *ArbConnection) SuggestGasPrice(_ context.Context) (*big.Int, error)
- func (conn *ArbConnection) TransactionReceipt(ctx context.Context, txHash ethcommon.Hash) (*types.Receipt, error)
- type ValidatorProxy
- type ValidatorProxyImpl
- func (vp *ValidatorProxyImpl) BlockHash(ctx context.Context, height uint64) (common.Hash, error)
- func (vp *ValidatorProxyImpl) BlockInfo(ctx context.Context, height uint64) (*machine.BlockInfo, error)
- func (vp *ValidatorProxyImpl) Call(ctx context.Context, msg message.Call, sender ethcommon.Address) (value.Value, error)
- func (vp *ValidatorProxyImpl) FindLogs(ctx context.Context, fromHeight, toHeight *uint64, ...) ([]evm.FullLog, error)
- func (vp *ValidatorProxyImpl) GetBlockCount(ctx context.Context) (uint64, error)
- func (vp *ValidatorProxyImpl) GetChainAddress(ctx context.Context) (ethcommon.Address, error)
- func (vp *ValidatorProxyImpl) GetRequestResult(ctx context.Context, txHash common.Hash) (value.Value, error)
- func (vp *ValidatorProxyImpl) PendingCall(ctx context.Context, msg message.Call, sender ethcommon.Address) (value.Value, error)
- func (vp *ValidatorProxyImpl) SendTransaction(ctx context.Context, tx *types.Transaction) (common.Hash, error)
Constants ¶
This section is empty.
Variables ¶
var Namespace = "Aggregator"
Functions ¶
This section is empty.
Types ¶
type ArbConnection ¶
type ArbConnection struct {
// contains filtered or unexported fields
}
func Dial ¶
func Dial(url string, pk *ecdsa.PrivateKey, rollupAddress common.Address) *ArbConnection
func NewArbConnection ¶ added in v0.7.1
func NewArbConnection(connection ValidatorProxy, pk *ecdsa.PrivateKey, rollupAddress common.Address) *ArbConnection
func (*ArbConnection) CallContract ¶
func (conn *ArbConnection) CallContract( ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int, ) ([]byte, error)
CallContract executes an Ethereum contract call with the specified data as the input.
func (*ArbConnection) CodeAt ¶
func (conn *ArbConnection) CodeAt( ctx context.Context, contract ethcommon.Address, blockNumber *big.Int, ) ([]byte, error)
CodeAt returns the code of the given account. This is needed to differentiate between contract internal errors and the local chain being out of sync.
func (*ArbConnection) EstimateGas ¶
func (conn *ArbConnection) EstimateGas( ctx context.Context, call ethereum.CallMsg, ) (uint64, error)
EstimateGas tries to estimate the gas needed to execute a specific transaction based on the current pending state of the backend blockchain. There is no guarantee that this is the true gas limit requirement as other transactions may be added or removed by miners, but it should provide a basis for setting a reasonable default.
func (*ArbConnection) FilterLogs ¶
func (conn *ArbConnection) FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error)
TODO: Currently FilterLogs does not properly handle reorgs by replaying undone logs with the removed flag set
func (*ArbConnection) PendingCallContract ¶ added in v0.4.0
func (conn *ArbConnection) PendingCallContract(ctx context.Context, call ethereum.CallMsg) ([]byte, error)
PendingCallContract executes an Ethereum contract call against the pending state.
func (*ArbConnection) PendingCodeAt ¶
func (conn *ArbConnection) PendingCodeAt( ctx context.Context, account ethcommon.Address, ) ([]byte, error)
PendingCodeAt returns the code of the given account in the pending state.
func (*ArbConnection) PendingNonceAt ¶
func (conn *ArbConnection) PendingNonceAt( ctx context.Context, account ethcommon.Address, ) (uint64, error)
PendingNonceAt retrieves the current pending nonce associated with an account.
func (*ArbConnection) SendTransaction ¶
func (conn *ArbConnection) SendTransaction(ctx context.Context, tx *types.Transaction) error
SendTransaction injects the transaction into the pending pool for execution.
func (*ArbConnection) SubscribeFilterLogs ¶
func (conn *ArbConnection) SubscribeFilterLogs( ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log, ) (ethereum.Subscription, error)
SubscribeFilterLogs creates a background log filtering operation, returning a subscription immediately, which can be used to stream the found events.
func (*ArbConnection) SuggestGasPrice ¶
SuggestGasPrice retrieves the currently suggested gas price to allow a timely execution of a transaction.
func (*ArbConnection) TransactionReceipt ¶ added in v0.4.0
func (conn *ArbConnection) TransactionReceipt(ctx context.Context, txHash ethcommon.Hash) (*types.Receipt, error)
TransactionReceipt returns the receipt of a transaction by transaction hash. Note that the receipt is not available for pending transactions.
type ValidatorProxy ¶
type ValidatorProxy interface { GetBlockCount(ctx context.Context) (uint64, error) SendTransaction(ctx context.Context, tx *types.Transaction) (common.Hash, error) BlockInfo(ctx context.Context, height uint64) (*machine.BlockInfo, error) BlockHash(ctx context.Context, height uint64) (common.Hash, error) GetRequestResult(ctx context.Context, txHash common.Hash) (value.Value, error) GetChainAddress(ctx context.Context) (ethcommon.Address, error) FindLogs(ctx context.Context, fromHeight, toHeight *uint64, addresses []ethcommon.Address, topics [][]ethcommon.Hash) ([]evm.FullLog, error) Call(ctx context.Context, msg message.Call, sender ethcommon.Address) (value.Value, error) PendingCall(ctx context.Context, msg message.Call, sender ethcommon.Address) (value.Value, error) }
func NewValidatorProxyImpl ¶
func NewValidatorProxyImpl(url string) ValidatorProxy
type ValidatorProxyImpl ¶
type ValidatorProxyImpl struct {
// contains filtered or unexported fields
}
func (*ValidatorProxyImpl) GetBlockCount ¶ added in v0.7.1
func (vp *ValidatorProxyImpl) GetBlockCount(ctx context.Context) (uint64, error)
func (*ValidatorProxyImpl) GetChainAddress ¶ added in v0.7.1
func (*ValidatorProxyImpl) GetRequestResult ¶ added in v0.7.1
func (*ValidatorProxyImpl) PendingCall ¶ added in v0.6.0
func (*ValidatorProxyImpl) SendTransaction ¶ added in v0.7.1
func (vp *ValidatorProxyImpl) SendTransaction(ctx context.Context, tx *types.Transaction) (common.Hash, error)