adapter

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeployingEthereumConnection added in v0.7.1

type DeployingEthereumConnection interface {
	EthereumConnection
	DeploySimpleStorageContract(auth *bind.TransactOpts, stringValue string) ([]byte, error)
	DeployEthereumContract(auth *bind.TransactOpts, abijson string, bytecode string, params ...interface{}) (*common.Address, *bind.BoundContract, error)
}

type EthereumCaller added in v0.7.1

type EthereumCaller interface {
	bind.ContractBackend
	TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
}

type EthereumConnection

type EthereumConnection interface {
	CallContract(ctx context.Context, contractAddress []byte, packedInput []byte, blockNumber *big.Int) (packedOutput []byte, err error)
	GetTransactionLogs(ctx context.Context, txHash primitives.Uint256, eventSignature []byte) ([]*TransactionLog, error)
	HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
}

type EthereumRpcConnection added in v0.7.1

type EthereumRpcConnection struct {
	// contains filtered or unexported fields
}

func NewEthereumRpcConnection added in v0.7.1

func NewEthereumRpcConnection(config ethereumAdapterConfig, logger log.BasicLogger) *EthereumRpcConnection

func (*EthereumRpcConnection) CallContract added in v0.7.1

func (c *EthereumRpcConnection) CallContract(ctx context.Context, contractAddress []byte, packedInput []byte, blockNumber *big.Int) (packedOutput []byte, err error)

func (*EthereumRpcConnection) DeployEthereumContract added in v0.7.1

func (c *EthereumRpcConnection) DeployEthereumContract(auth *bind.TransactOpts, abijson string, bytecode string, params ...interface{}) (*common.Address, *bind.BoundContract, error)

func (*EthereumRpcConnection) DeployEthereumContractManually added in v0.7.5

func (c *EthereumRpcConnection) DeployEthereumContractManually(ctx context.Context, auth *bind.TransactOpts, abijson string, bytecode string, params ...interface{}) (*common.Address, error)

func (*EthereumRpcConnection) DeploySimpleStorageContract added in v0.7.1

func (c *EthereumRpcConnection) DeploySimpleStorageContract(auth *bind.TransactOpts, stringValue string) ([]byte, error)

this is a helper for integration test, not used in production code

func (*EthereumRpcConnection) GetTransactionLogs added in v0.7.1

func (c *EthereumRpcConnection) GetTransactionLogs(ctx context.Context, txHash primitives.Uint256, eventSignature []byte) ([]*TransactionLog, error)

func (*EthereumRpcConnection) HeaderByNumber added in v0.7.5

func (rpc *EthereumRpcConnection) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)

func (*EthereumRpcConnection) Receipt added in v0.7.5

func (c *EthereumRpcConnection) Receipt(txHash common.Hash) (*types.Receipt, error)

type EthereumSimulator

type EthereumSimulator struct {
	// contains filtered or unexported fields
}

func NewEthereumSimulatorConnection

func NewEthereumSimulatorConnection(logger log.BasicLogger) *EthereumSimulator

func (*EthereumSimulator) CallContract added in v0.7.1

func (c *EthereumSimulator) CallContract(ctx context.Context, contractAddress []byte, packedInput []byte, blockNumber *big.Int) (packedOutput []byte, err error)

func (*EthereumSimulator) Commit added in v0.7.1

func (es *EthereumSimulator) Commit()

func (*EthereumSimulator) DeployEthereumContract added in v0.7.1

func (c *EthereumSimulator) DeployEthereumContract(auth *bind.TransactOpts, abijson string, bytecode string, params ...interface{}) (*common.Address, *bind.BoundContract, error)

func (*EthereumSimulator) DeployEthereumContractManually added in v0.7.5

func (c *EthereumSimulator) DeployEthereumContractManually(ctx context.Context, auth *bind.TransactOpts, abijson string, bytecode string, params ...interface{}) (*common.Address, error)

func (*EthereumSimulator) DeploySimpleStorageContract added in v0.7.1

func (c *EthereumSimulator) DeploySimpleStorageContract(auth *bind.TransactOpts, stringValue string) ([]byte, error)

this is a helper for integration test, not used in production code

func (*EthereumSimulator) GetAuth

func (es *EthereumSimulator) GetAuth() *bind.TransactOpts

func (*EthereumSimulator) GetTransactionLogs added in v0.7.1

func (c *EthereumSimulator) GetTransactionLogs(ctx context.Context, txHash primitives.Uint256, eventSignature []byte) ([]*TransactionLog, error)

func (*EthereumSimulator) HeaderByNumber added in v0.7.5

func (es *EthereumSimulator) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)

func (*EthereumSimulator) Receipt added in v0.7.5

func (c *EthereumSimulator) Receipt(txHash common.Hash) (*types.Receipt, error)

type TransactionLog added in v0.7.1

type TransactionLog struct {
	ContractAddress []byte
	PackedTopics    [][]byte // indexed fields
	Data            []byte   // non-indexed fields
	RepackedData    []byte
	BlockNumber     uint64
}

func (*TransactionLog) PackedDataArgumentAt added in v0.7.1

func (l *TransactionLog) PackedDataArgumentAt(index int) ([]byte, error)

TODO(v1): this assumes that in events Data every input is 32 bytes (eg. no tuples), is this always the case? [OdedW]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL