Documentation
¶
Index ¶
- Variables
- func CreateReceiptProofEvm(coreClient *sdk.Client, evmClient *web3go.Client, txHash common.Hash, ...) (*contract.TypesReceiptProof, error)
- func CreateReceiptsMPT(epochReceipts [][]types.TransactionReceipt) ([]*mpt.Node, *mpt.Node)
- func CreateTransactionsMPT(txs []types.WrapTransaction) *mpt.Node
- type EvmRelayConfig
- type EvmRelayer
- type ProofGenerator
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTransactionExecutionFailed = errors.New("transaction execution failed")
View Source
var RelayInterval = 3 * time.Second
Functions ¶
func CreateReceiptProofEvm ¶ added in v1.5.8
func CreateReceiptsMPT ¶
func CreateTransactionsMPT ¶
func CreateTransactionsMPT(txs []types.WrapTransaction) *mpt.Node
Types ¶
type EvmRelayConfig ¶
type EvmRelayConfig struct { LightNode common.Address // light node contract LedgerInfo common.Address // ledger info contract Verifier common.Address // MPT verification contract Admin common.Address // management admin address or relayer EpochFrom uint64 // epoch for initialization GcLimits int64 // maximum number of blocks to remove at a time GasLimit uint64 // Fixed gas limit to send transaction if specified }
type EvmRelayer ¶
type EvmRelayer struct { EvmRelayConfig // contains filtered or unexported fields }
func NewEvmRelayer ¶
func NewEvmRelayer(coreClient *sdk.Client, relayerClient *web3go.Client, config EvmRelayConfig) *EvmRelayer
func (*EvmRelayer) Relay ¶
func (r *EvmRelayer) Relay()
func (*EvmRelayer) RelayPoWBlocks ¶
func (r *EvmRelayer) RelayPoWBlocks(headers [][]byte) error
type ProofGenerator ¶
type ProofGenerator struct {
// contains filtered or unexported fields
}
func NewProofGenerator ¶
func (*ProofGenerator) CreateReceiptProofEvm ¶
func (g *ProofGenerator) CreateReceiptProofEvm(evmClient *web3go.Client, txHash common.Hash) (*contract.TypesReceiptProof, error)
CreateReceiptProofEvm returns the receipt proof for specified `txHash` on eSpace.
If receipt not found, it will return nil and requires client to retry later.
If transaction execution failed, it will return `ErrTransactionExecutionFailed`.
Click to show internal directories.
Click to hide internal directories.