testimonium

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2019 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const TestimoniumABI = "" /* 5110-byte string literal not displayed */

TestimoniumABI is the input ABI used to generate the binding from.

Variables

View Source
var TestimoniumBin = "" /* 39354-byte string literal not displayed */

TestimoniumBin is the compiled bytecode used for deploying new contracts.

Functions

func CreateChainConfig

func CreateChainConfig(connectionType string, connectionUrl string, connectionPort uint64) map[string]interface{}

Types

type BlockHeader

type BlockHeader struct {
	Parent                    [32]byte
	UncleHash                 [32]byte
	StateRoot                 [32]byte
	TransactionsRoot          [32]byte
	ReceiptsRoot              [32]byte
	BlockNumber               *big.Int
	GasLimit                  *big.Int
	RlpHeaderHashWithoutNonce [32]byte
	Timestamp                 *big.Int
	Nonce                     *big.Int
	Difficulty                *big.Int
	TotalDifficulty           *big.Int
}

func (BlockHeader) String

func (header BlockHeader) String() string

type Chain

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

type ChainConfig

type ChainConfig map[string]interface{}

type ChainsConfig

type ChainsConfig map[uint8]ChainConfig

type Client

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

func NewClient

func NewClient(privateKey string, chainsConfig map[string]interface{}) *Client

func (Client) Account

func (c Client) Account() string

func (Client) Balance

func (c Client) Balance(chainId uint8) (*big.Int, error)

func (Client) BlockByHash

func (c Client) BlockByHash(blockHash common.Hash, chain uint8) (*types.Block, error)

func (Client) BlockByNumber

func (c Client) BlockByNumber(blockNumber uint64, chain uint8) (*types.Block, error)

func (Client) BlockHeader

func (c Client) BlockHeader(blockHash [32]byte, chain uint8) (BlockHeader, error)

func (Client) BlockHeaderExists

func (c Client) BlockHeaderExists(blockHash [32]byte, chain uint8) (bool, error)

func (Client) Chains

func (c Client) Chains() []uint8

func (Client) DeployEthash

func (c Client) DeployEthash(targetChain uint8) common.Address

func (Client) DeployTestimonium

func (c Client) DeployTestimonium(targetChain uint8, sourceChain uint8, genesisBlockNumber uint64) common.Address

func (Client) DisputeBlock

func (c Client) DisputeBlock(blockHash [32]byte, dataSetLookUp []*big.Int, witnessForLookup []*big.Int, chain uint8)

func (Client) GenerateMerkleProofForReceipt

func (c Client) GenerateMerkleProofForReceipt(txHash [32]byte, chain uint8) ([32]byte, []byte, []byte, []byte, error)

func (Client) GenerateMerkleProofForTx

func (c Client) GenerateMerkleProofForTx(txHash [32]byte, chain uint8) ([32]byte, []byte, []byte, []byte, error)

func (Client) HeaderByHash

func (c Client) HeaderByHash(blockHash common.Hash, chain uint8) (*types.Header, error)

func (Client) HeaderByNumber

func (c Client) HeaderByNumber(blockNumber *big.Int, chain uint8) (*types.Header, error)

func (Client) OriginalBlockHeader

func (c Client) OriginalBlockHeader(blockHash [32]byte, chain uint8) (*types.Block, error)

func (Client) RandomizeHeader

func (c Client) RandomizeHeader(header *types.Header, chain uint8) *types.Header

func (Client) SetEpochData

func (c Client) SetEpochData(epochData typedefs.EpochData, chain uint8)

func (Client) SubmitHeader

func (c Client) SubmitHeader(header *types.Header, chain uint8)

func (Client) SubmitRLPHeader

func (c Client) SubmitRLPHeader(rlpHeader []byte, chain uint8)

func (Client) TotalBalance

func (c Client) TotalBalance() (*big.Int, error)

func (Client) TotalDifficulty

func (c Client) TotalDifficulty(blockNumber *big.Int, chain uint8) (*big.Int, error)

func (Client) Transaction

func (c Client) Transaction(txHash common.Hash, chain uint8) (*types.Transaction, bool, error)

func (Client) TransactionReceipt

func (c Client) TransactionReceipt(txHash common.Hash, chain uint8) (*types.Receipt, error)

func (Client) VerifyMerkleProof

func (c Client) VerifyMerkleProof(blockHash [32]byte, trieValueType TrieValueType, rlpEncodedValue []byte, path []byte,
	rlpEncodedProofNodes []byte, noOfConfirmations uint8, chain uint8) bool

type Testimonium

type Testimonium struct {
	TestimoniumCaller     // Read-only binding to the contract
	TestimoniumTransactor // Write-only binding to the contract
	TestimoniumFilterer   // Log filterer for contract events
}

Testimonium is an auto generated Go binding around an Ethereum contract.

func DeployTestimonium

func DeployTestimonium(auth *bind.TransactOpts, backend bind.ContractBackend, _rlpHeader []byte, totalDifficulty *big.Int, _ethashContractAddr common.Address) (common.Address, *types.Transaction, *Testimonium, error)

DeployTestimonium deploys a new Ethereum contract, binding an instance of Testimonium to it.

func NewTestimonium

func NewTestimonium(address common.Address, backend bind.ContractBackend) (*Testimonium, error)

NewTestimonium creates a new instance of Testimonium, bound to a specific deployed contract.

type TestimoniumCaller

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

TestimoniumCaller is an auto generated read-only Go binding around an Ethereum contract.

func NewTestimoniumCaller

func NewTestimoniumCaller(address common.Address, caller bind.ContractCaller) (*TestimoniumCaller, error)

NewTestimoniumCaller creates a new read-only instance of Testimonium, bound to a specific deployed contract.

func (*TestimoniumCaller) GetBlockHashOfEndpoint

func (_Testimonium *TestimoniumCaller) GetBlockHashOfEndpoint(opts *bind.CallOpts, index *big.Int) ([32]byte, error)

GetBlockHashOfEndpoint is a free data retrieval call binding the contract method 0x84bc44b3.

Solidity: function getBlockHashOfEndpoint(uint256 index) constant returns(bytes32)

func (*TestimoniumCaller) GetHeader

func (_Testimonium *TestimoniumCaller) GetHeader(opts *bind.CallOpts, blockHash [32]byte) (struct {
	Parent                    [32]byte
	UncleHash                 [32]byte
	StateRoot                 [32]byte
	TransactionsRoot          [32]byte
	ReceiptsRoot              [32]byte
	BlockNumber               *big.Int
	GasLimit                  *big.Int
	RlpHeaderHashWithoutNonce [32]byte
	Timestamp                 *big.Int
	Nonce                     *big.Int
	Difficulty                *big.Int
	TotalDifficulty           *big.Int
}, error)

GetHeader is a free data retrieval call binding the contract method 0xb9615878.

Solidity: function getHeader(bytes32 blockHash) constant returns(bytes32 parent, bytes32 uncleHash, bytes32 stateRoot, bytes32 transactionsRoot, bytes32 receiptsRoot, uint256 blockNumber, uint256 gasLimit, bytes32 rlpHeaderHashWithoutNonce, uint256 timestamp, uint256 nonce, uint256 difficulty, uint256 totalDifficulty)

func (*TestimoniumCaller) GetHeaderMetaInfo

func (_Testimonium *TestimoniumCaller) GetHeaderMetaInfo(opts *bind.CallOpts, blockHash [32]byte) (struct {
	Successors    [][32]byte
	OrderedIndex  *big.Int
	IterableIndex *big.Int
	LatestFork    [32]byte
	LockedUntil   *big.Int
}, error)

GetHeaderMetaInfo is a free data retrieval call binding the contract method 0x3b93fc10.

Solidity: function getHeaderMetaInfo(bytes32 blockHash) constant returns(bytes32[] successors, uint256 orderedIndex, uint256 iterableIndex, bytes32 latestFork, uint256 lockedUntil)

func (*TestimoniumCaller) GetNoOfForks

func (_Testimonium *TestimoniumCaller) GetNoOfForks(opts *bind.CallOpts) (*big.Int, error)

GetNoOfForks is a free data retrieval call binding the contract method 0xfbb5df38.

Solidity: function getNoOfForks() constant returns(uint256)

func (*TestimoniumCaller) IsBlock

func (_Testimonium *TestimoniumCaller) IsBlock(opts *bind.CallOpts, hash [32]byte) (bool, error)

IsBlock is a free data retrieval call binding the contract method 0x528a309f.

Solidity: function isBlock(bytes32 hash) constant returns(bool)

func (*TestimoniumCaller) IsUnlocked

func (_Testimonium *TestimoniumCaller) IsUnlocked(opts *bind.CallOpts, blockHash [32]byte) (bool, error)

IsUnlocked is a free data retrieval call binding the contract method 0x3dadc1e1.

Solidity: function isUnlocked(bytes32 blockHash) constant returns(bool)

func (*TestimoniumCaller) LongestChainEndpoint

func (_Testimonium *TestimoniumCaller) LongestChainEndpoint(opts *bind.CallOpts) ([32]byte, error)

LongestChainEndpoint is a free data retrieval call binding the contract method 0x0aa7fc0f.

Solidity: function longestChainEndpoint() constant returns(bytes32)

func (*TestimoniumCaller) VerifyReceipt

func (_Testimonium *TestimoniumCaller) VerifyReceipt(opts *bind.CallOpts, blockHash [32]byte, noOfConfirmations uint8, rlpEncodedReceipt []byte, path []byte, rlpEncodedNodes []byte) (uint8, error)

VerifyReceipt is a free data retrieval call binding the contract method 0x10fa6e83.

Solidity: function verifyReceipt(bytes32 blockHash, uint8 noOfConfirmations, bytes rlpEncodedReceipt, bytes path, bytes rlpEncodedNodes) constant returns(uint8)

func (*TestimoniumCaller) VerifyState

func (_Testimonium *TestimoniumCaller) VerifyState(opts *bind.CallOpts, blockHash [32]byte, noOfConfirmations uint8, rlpEncodedState []byte, path []byte, rlpEncodedNodes []byte) (uint8, error)

VerifyState is a free data retrieval call binding the contract method 0xfadfdb81.

Solidity: function verifyState(bytes32 blockHash, uint8 noOfConfirmations, bytes rlpEncodedState, bytes path, bytes rlpEncodedNodes) constant returns(uint8)

func (*TestimoniumCaller) VerifyTransaction

func (_Testimonium *TestimoniumCaller) VerifyTransaction(opts *bind.CallOpts, blockHash [32]byte, noOfConfirmations uint8, rlpEncodedTx []byte, path []byte, rlpEncodedNodes []byte) (uint8, error)

VerifyTransaction is a free data retrieval call binding the contract method 0xa90a51f4.

Solidity: function verifyTransaction(bytes32 blockHash, uint8 noOfConfirmations, bytes rlpEncodedTx, bytes path, bytes rlpEncodedNodes) constant returns(uint8)

type TestimoniumCallerRaw

type TestimoniumCallerRaw struct {
	Contract *TestimoniumCaller // Generic read-only contract binding to access the raw methods on
}

TestimoniumCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*TestimoniumCallerRaw) Call

func (_Testimonium *TestimoniumCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

type TestimoniumCallerSession

type TestimoniumCallerSession struct {
	Contract *TestimoniumCaller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts      // Call options to use throughout this session
}

TestimoniumCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

func (*TestimoniumCallerSession) GetBlockHashOfEndpoint

func (_Testimonium *TestimoniumCallerSession) GetBlockHashOfEndpoint(index *big.Int) ([32]byte, error)

GetBlockHashOfEndpoint is a free data retrieval call binding the contract method 0x84bc44b3.

Solidity: function getBlockHashOfEndpoint(uint256 index) constant returns(bytes32)

func (*TestimoniumCallerSession) GetHeader

func (_Testimonium *TestimoniumCallerSession) GetHeader(blockHash [32]byte) (struct {
	Parent                    [32]byte
	UncleHash                 [32]byte
	StateRoot                 [32]byte
	TransactionsRoot          [32]byte
	ReceiptsRoot              [32]byte
	BlockNumber               *big.Int
	GasLimit                  *big.Int
	RlpHeaderHashWithoutNonce [32]byte
	Timestamp                 *big.Int
	Nonce                     *big.Int
	Difficulty                *big.Int
	TotalDifficulty           *big.Int
}, error)

GetHeader is a free data retrieval call binding the contract method 0xb9615878.

Solidity: function getHeader(bytes32 blockHash) constant returns(bytes32 parent, bytes32 uncleHash, bytes32 stateRoot, bytes32 transactionsRoot, bytes32 receiptsRoot, uint256 blockNumber, uint256 gasLimit, bytes32 rlpHeaderHashWithoutNonce, uint256 timestamp, uint256 nonce, uint256 difficulty, uint256 totalDifficulty)

func (*TestimoniumCallerSession) GetHeaderMetaInfo

func (_Testimonium *TestimoniumCallerSession) GetHeaderMetaInfo(blockHash [32]byte) (struct {
	Successors    [][32]byte
	OrderedIndex  *big.Int
	IterableIndex *big.Int
	LatestFork    [32]byte
	LockedUntil   *big.Int
}, error)

GetHeaderMetaInfo is a free data retrieval call binding the contract method 0x3b93fc10.

Solidity: function getHeaderMetaInfo(bytes32 blockHash) constant returns(bytes32[] successors, uint256 orderedIndex, uint256 iterableIndex, bytes32 latestFork, uint256 lockedUntil)

func (*TestimoniumCallerSession) GetNoOfForks

func (_Testimonium *TestimoniumCallerSession) GetNoOfForks() (*big.Int, error)

GetNoOfForks is a free data retrieval call binding the contract method 0xfbb5df38.

Solidity: function getNoOfForks() constant returns(uint256)

func (*TestimoniumCallerSession) IsBlock

func (_Testimonium *TestimoniumCallerSession) IsBlock(hash [32]byte) (bool, error)

IsBlock is a free data retrieval call binding the contract method 0x528a309f.

Solidity: function isBlock(bytes32 hash) constant returns(bool)

func (*TestimoniumCallerSession) IsUnlocked

func (_Testimonium *TestimoniumCallerSession) IsUnlocked(blockHash [32]byte) (bool, error)

IsUnlocked is a free data retrieval call binding the contract method 0x3dadc1e1.

Solidity: function isUnlocked(bytes32 blockHash) constant returns(bool)

func (*TestimoniumCallerSession) LongestChainEndpoint

func (_Testimonium *TestimoniumCallerSession) LongestChainEndpoint() ([32]byte, error)

LongestChainEndpoint is a free data retrieval call binding the contract method 0x0aa7fc0f.

Solidity: function longestChainEndpoint() constant returns(bytes32)

func (*TestimoniumCallerSession) VerifyReceipt

func (_Testimonium *TestimoniumCallerSession) VerifyReceipt(blockHash [32]byte, noOfConfirmations uint8, rlpEncodedReceipt []byte, path []byte, rlpEncodedNodes []byte) (uint8, error)

VerifyReceipt is a free data retrieval call binding the contract method 0x10fa6e83.

Solidity: function verifyReceipt(bytes32 blockHash, uint8 noOfConfirmations, bytes rlpEncodedReceipt, bytes path, bytes rlpEncodedNodes) constant returns(uint8)

func (*TestimoniumCallerSession) VerifyState

func (_Testimonium *TestimoniumCallerSession) VerifyState(blockHash [32]byte, noOfConfirmations uint8, rlpEncodedState []byte, path []byte, rlpEncodedNodes []byte) (uint8, error)

VerifyState is a free data retrieval call binding the contract method 0xfadfdb81.

Solidity: function verifyState(bytes32 blockHash, uint8 noOfConfirmations, bytes rlpEncodedState, bytes path, bytes rlpEncodedNodes) constant returns(uint8)

func (*TestimoniumCallerSession) VerifyTransaction

func (_Testimonium *TestimoniumCallerSession) VerifyTransaction(blockHash [32]byte, noOfConfirmations uint8, rlpEncodedTx []byte, path []byte, rlpEncodedNodes []byte) (uint8, error)

VerifyTransaction is a free data retrieval call binding the contract method 0xa90a51f4.

Solidity: function verifyTransaction(bytes32 blockHash, uint8 noOfConfirmations, bytes rlpEncodedTx, bytes path, bytes rlpEncodedNodes) constant returns(uint8)

type TestimoniumFilterer

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

TestimoniumFilterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewTestimoniumFilterer

func NewTestimoniumFilterer(address common.Address, filterer bind.ContractFilterer) (*TestimoniumFilterer, error)

NewTestimoniumFilterer creates a new log filterer instance of Testimonium, bound to a specific deployed contract.

func (*TestimoniumFilterer) FilterPoWValidationResult

func (_Testimonium *TestimoniumFilterer) FilterPoWValidationResult(opts *bind.FilterOpts) (*TestimoniumPoWValidationResultIterator, error)

FilterPoWValidationResult is a free log retrieval operation binding the contract event 0x808f84bd298b89733055f3b8294b385ed860b67438b792ff9e312c897a2fcd9f.

Solidity: event PoWValidationResult(bool isPoWValid, uint256 errorCode, uint256 errorInfo)

func (*TestimoniumFilterer) FilterRemoveBranch

func (_Testimonium *TestimoniumFilterer) FilterRemoveBranch(opts *bind.FilterOpts) (*TestimoniumRemoveBranchIterator, error)

FilterRemoveBranch is a free log retrieval operation binding the contract event 0xf96ae1a1e71431cfb86761b9cab725aeddab2afdaf76d40d43fc005bdc6555d4.

Solidity: event RemoveBranch(bytes32 root)

func (*TestimoniumFilterer) FilterSubmitBlockHeader

func (_Testimonium *TestimoniumFilterer) FilterSubmitBlockHeader(opts *bind.FilterOpts) (*TestimoniumSubmitBlockHeaderIterator, error)

FilterSubmitBlockHeader is a free log retrieval operation binding the contract event 0x56a7be9848412b60f43fa0c4d4e9bb1d1dec16601d6a291428be09dd76b75951.

Solidity: event SubmitBlockHeader(bytes32 hash, bytes32 hashWithoutNonce, uint256 nonce, uint256 difficulty, bytes32 parent, bytes32 transactionsRoot)

func (*TestimoniumFilterer) ParsePoWValidationResult

func (_Testimonium *TestimoniumFilterer) ParsePoWValidationResult(log types.Log) (*TestimoniumPoWValidationResult, error)

ParsePoWValidationResult is a log parse operation binding the contract event 0x808f84bd298b89733055f3b8294b385ed860b67438b792ff9e312c897a2fcd9f.

Solidity: event PoWValidationResult(bool isPoWValid, uint256 errorCode, uint256 errorInfo)

func (*TestimoniumFilterer) ParseRemoveBranch

func (_Testimonium *TestimoniumFilterer) ParseRemoveBranch(log types.Log) (*TestimoniumRemoveBranch, error)

ParseRemoveBranch is a log parse operation binding the contract event 0xf96ae1a1e71431cfb86761b9cab725aeddab2afdaf76d40d43fc005bdc6555d4.

Solidity: event RemoveBranch(bytes32 root)

func (*TestimoniumFilterer) ParseSubmitBlockHeader

func (_Testimonium *TestimoniumFilterer) ParseSubmitBlockHeader(log types.Log) (*TestimoniumSubmitBlockHeader, error)

ParseSubmitBlockHeader is a log parse operation binding the contract event 0x56a7be9848412b60f43fa0c4d4e9bb1d1dec16601d6a291428be09dd76b75951.

Solidity: event SubmitBlockHeader(bytes32 hash, bytes32 hashWithoutNonce, uint256 nonce, uint256 difficulty, bytes32 parent, bytes32 transactionsRoot)

func (*TestimoniumFilterer) WatchPoWValidationResult

func (_Testimonium *TestimoniumFilterer) WatchPoWValidationResult(opts *bind.WatchOpts, sink chan<- *TestimoniumPoWValidationResult) (event.Subscription, error)

WatchPoWValidationResult is a free log subscription operation binding the contract event 0x808f84bd298b89733055f3b8294b385ed860b67438b792ff9e312c897a2fcd9f.

Solidity: event PoWValidationResult(bool isPoWValid, uint256 errorCode, uint256 errorInfo)

func (*TestimoniumFilterer) WatchRemoveBranch

func (_Testimonium *TestimoniumFilterer) WatchRemoveBranch(opts *bind.WatchOpts, sink chan<- *TestimoniumRemoveBranch) (event.Subscription, error)

WatchRemoveBranch is a free log subscription operation binding the contract event 0xf96ae1a1e71431cfb86761b9cab725aeddab2afdaf76d40d43fc005bdc6555d4.

Solidity: event RemoveBranch(bytes32 root)

func (*TestimoniumFilterer) WatchSubmitBlockHeader

func (_Testimonium *TestimoniumFilterer) WatchSubmitBlockHeader(opts *bind.WatchOpts, sink chan<- *TestimoniumSubmitBlockHeader) (event.Subscription, error)

WatchSubmitBlockHeader is a free log subscription operation binding the contract event 0x56a7be9848412b60f43fa0c4d4e9bb1d1dec16601d6a291428be09dd76b75951.

Solidity: event SubmitBlockHeader(bytes32 hash, bytes32 hashWithoutNonce, uint256 nonce, uint256 difficulty, bytes32 parent, bytes32 transactionsRoot)

type TestimoniumPoWValidationResult

type TestimoniumPoWValidationResult struct {
	IsPoWValid bool
	ErrorCode  *big.Int
	ErrorInfo  *big.Int
	Raw        types.Log // Blockchain specific contextual infos
}

TestimoniumPoWValidationResult represents a PoWValidationResult event raised by the Testimonium contract.

func (TestimoniumPoWValidationResult) String

func (event TestimoniumPoWValidationResult) String() string

type TestimoniumPoWValidationResultIterator

type TestimoniumPoWValidationResultIterator struct {
	Event *TestimoniumPoWValidationResult // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

TestimoniumPoWValidationResultIterator is returned from FilterPoWValidationResult and is used to iterate over the raw logs and unpacked data for PoWValidationResult events raised by the Testimonium contract.

func (*TestimoniumPoWValidationResultIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*TestimoniumPoWValidationResultIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*TestimoniumPoWValidationResultIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type TestimoniumRaw

type TestimoniumRaw struct {
	Contract *Testimonium // Generic contract binding to access the raw methods on
}

TestimoniumRaw is an auto generated low-level Go binding around an Ethereum contract.

func (*TestimoniumRaw) Call

func (_Testimonium *TestimoniumRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

func (*TestimoniumRaw) Transact

func (_Testimonium *TestimoniumRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*TestimoniumRaw) Transfer

func (_Testimonium *TestimoniumRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type TestimoniumRemoveBranch

type TestimoniumRemoveBranch struct {
	Root [32]byte
	Raw  types.Log // Blockchain specific contextual infos
}

TestimoniumRemoveBranch represents a RemoveBranch event raised by the Testimonium contract.

func (TestimoniumRemoveBranch) String

func (event TestimoniumRemoveBranch) String() string

type TestimoniumRemoveBranchIterator

type TestimoniumRemoveBranchIterator struct {
	Event *TestimoniumRemoveBranch // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

TestimoniumRemoveBranchIterator is returned from FilterRemoveBranch and is used to iterate over the raw logs and unpacked data for RemoveBranch events raised by the Testimonium contract.

func (*TestimoniumRemoveBranchIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*TestimoniumRemoveBranchIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*TestimoniumRemoveBranchIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type TestimoniumSession

type TestimoniumSession struct {
	Contract     *Testimonium      // Generic contract binding to set the session for
	CallOpts     bind.CallOpts     // Call options to use throughout this session
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

TestimoniumSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

func (*TestimoniumSession) DisputeBlock

func (_Testimonium *TestimoniumSession) DisputeBlock(blockHash [32]byte, dataSetLookup []*big.Int, witnessForLookup []*big.Int) (*types.Transaction, error)

DisputeBlock is a paid mutator transaction binding the contract method 0x66962b26.

Solidity: function disputeBlock(bytes32 blockHash, uint256[] dataSetLookup, uint256[] witnessForLookup) returns()

func (*TestimoniumSession) GetBlockHashOfEndpoint

func (_Testimonium *TestimoniumSession) GetBlockHashOfEndpoint(index *big.Int) ([32]byte, error)

GetBlockHashOfEndpoint is a free data retrieval call binding the contract method 0x84bc44b3.

Solidity: function getBlockHashOfEndpoint(uint256 index) constant returns(bytes32)

func (*TestimoniumSession) GetHeader

func (_Testimonium *TestimoniumSession) GetHeader(blockHash [32]byte) (struct {
	Parent                    [32]byte
	UncleHash                 [32]byte
	StateRoot                 [32]byte
	TransactionsRoot          [32]byte
	ReceiptsRoot              [32]byte
	BlockNumber               *big.Int
	GasLimit                  *big.Int
	RlpHeaderHashWithoutNonce [32]byte
	Timestamp                 *big.Int
	Nonce                     *big.Int
	Difficulty                *big.Int
	TotalDifficulty           *big.Int
}, error)

GetHeader is a free data retrieval call binding the contract method 0xb9615878.

Solidity: function getHeader(bytes32 blockHash) constant returns(bytes32 parent, bytes32 uncleHash, bytes32 stateRoot, bytes32 transactionsRoot, bytes32 receiptsRoot, uint256 blockNumber, uint256 gasLimit, bytes32 rlpHeaderHashWithoutNonce, uint256 timestamp, uint256 nonce, uint256 difficulty, uint256 totalDifficulty)

func (*TestimoniumSession) GetHeaderMetaInfo

func (_Testimonium *TestimoniumSession) GetHeaderMetaInfo(blockHash [32]byte) (struct {
	Successors    [][32]byte
	OrderedIndex  *big.Int
	IterableIndex *big.Int
	LatestFork    [32]byte
	LockedUntil   *big.Int
}, error)

GetHeaderMetaInfo is a free data retrieval call binding the contract method 0x3b93fc10.

Solidity: function getHeaderMetaInfo(bytes32 blockHash) constant returns(bytes32[] successors, uint256 orderedIndex, uint256 iterableIndex, bytes32 latestFork, uint256 lockedUntil)

func (*TestimoniumSession) GetNoOfForks

func (_Testimonium *TestimoniumSession) GetNoOfForks() (*big.Int, error)

GetNoOfForks is a free data retrieval call binding the contract method 0xfbb5df38.

Solidity: function getNoOfForks() constant returns(uint256)

func (*TestimoniumSession) IsBlock

func (_Testimonium *TestimoniumSession) IsBlock(hash [32]byte) (bool, error)

IsBlock is a free data retrieval call binding the contract method 0x528a309f.

Solidity: function isBlock(bytes32 hash) constant returns(bool)

func (*TestimoniumSession) IsUnlocked

func (_Testimonium *TestimoniumSession) IsUnlocked(blockHash [32]byte) (bool, error)

IsUnlocked is a free data retrieval call binding the contract method 0x3dadc1e1.

Solidity: function isUnlocked(bytes32 blockHash) constant returns(bool)

func (*TestimoniumSession) LongestChainEndpoint

func (_Testimonium *TestimoniumSession) LongestChainEndpoint() ([32]byte, error)

LongestChainEndpoint is a free data retrieval call binding the contract method 0x0aa7fc0f.

Solidity: function longestChainEndpoint() constant returns(bytes32)

func (*TestimoniumSession) SubmitHeader

func (_Testimonium *TestimoniumSession) SubmitHeader(_rlpHeader []byte) (*types.Transaction, error)

SubmitHeader is a paid mutator transaction binding the contract method 0xc565ba10.

Solidity: function submitHeader(bytes _rlpHeader) returns()

func (*TestimoniumSession) VerifyReceipt

func (_Testimonium *TestimoniumSession) VerifyReceipt(blockHash [32]byte, noOfConfirmations uint8, rlpEncodedReceipt []byte, path []byte, rlpEncodedNodes []byte) (uint8, error)

VerifyReceipt is a free data retrieval call binding the contract method 0x10fa6e83.

Solidity: function verifyReceipt(bytes32 blockHash, uint8 noOfConfirmations, bytes rlpEncodedReceipt, bytes path, bytes rlpEncodedNodes) constant returns(uint8)

func (*TestimoniumSession) VerifyState

func (_Testimonium *TestimoniumSession) VerifyState(blockHash [32]byte, noOfConfirmations uint8, rlpEncodedState []byte, path []byte, rlpEncodedNodes []byte) (uint8, error)

VerifyState is a free data retrieval call binding the contract method 0xfadfdb81.

Solidity: function verifyState(bytes32 blockHash, uint8 noOfConfirmations, bytes rlpEncodedState, bytes path, bytes rlpEncodedNodes) constant returns(uint8)

func (*TestimoniumSession) VerifyTransaction

func (_Testimonium *TestimoniumSession) VerifyTransaction(blockHash [32]byte, noOfConfirmations uint8, rlpEncodedTx []byte, path []byte, rlpEncodedNodes []byte) (uint8, error)

VerifyTransaction is a free data retrieval call binding the contract method 0xa90a51f4.

Solidity: function verifyTransaction(bytes32 blockHash, uint8 noOfConfirmations, bytes rlpEncodedTx, bytes path, bytes rlpEncodedNodes) constant returns(uint8)

type TestimoniumSubmitBlockHeader

type TestimoniumSubmitBlockHeader struct {
	Hash             [32]byte
	HashWithoutNonce [32]byte
	Nonce            *big.Int
	Difficulty       *big.Int
	Parent           [32]byte
	TransactionsRoot [32]byte
	Raw              types.Log // Blockchain specific contextual infos
}

TestimoniumSubmitBlockHeader represents a SubmitBlockHeader event raised by the Testimonium contract.

func (TestimoniumSubmitBlockHeader) String

type TestimoniumSubmitBlockHeaderIterator

type TestimoniumSubmitBlockHeaderIterator struct {
	Event *TestimoniumSubmitBlockHeader // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

TestimoniumSubmitBlockHeaderIterator is returned from FilterSubmitBlockHeader and is used to iterate over the raw logs and unpacked data for SubmitBlockHeader events raised by the Testimonium contract.

func (*TestimoniumSubmitBlockHeaderIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*TestimoniumSubmitBlockHeaderIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*TestimoniumSubmitBlockHeaderIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type TestimoniumTransactor

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

TestimoniumTransactor is an auto generated write-only Go binding around an Ethereum contract.

func NewTestimoniumTransactor

func NewTestimoniumTransactor(address common.Address, transactor bind.ContractTransactor) (*TestimoniumTransactor, error)

NewTestimoniumTransactor creates a new write-only instance of Testimonium, bound to a specific deployed contract.

func (*TestimoniumTransactor) DisputeBlock

func (_Testimonium *TestimoniumTransactor) DisputeBlock(opts *bind.TransactOpts, blockHash [32]byte, dataSetLookup []*big.Int, witnessForLookup []*big.Int) (*types.Transaction, error)

DisputeBlock is a paid mutator transaction binding the contract method 0x66962b26.

Solidity: function disputeBlock(bytes32 blockHash, uint256[] dataSetLookup, uint256[] witnessForLookup) returns()

func (*TestimoniumTransactor) SubmitHeader

func (_Testimonium *TestimoniumTransactor) SubmitHeader(opts *bind.TransactOpts, _rlpHeader []byte) (*types.Transaction, error)

SubmitHeader is a paid mutator transaction binding the contract method 0xc565ba10.

Solidity: function submitHeader(bytes _rlpHeader) returns()

type TestimoniumTransactorRaw

type TestimoniumTransactorRaw struct {
	Contract *TestimoniumTransactor // Generic write-only contract binding to access the raw methods on
}

TestimoniumTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*TestimoniumTransactorRaw) Transact

func (_Testimonium *TestimoniumTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*TestimoniumTransactorRaw) Transfer

func (_Testimonium *TestimoniumTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type TestimoniumTransactorSession

type TestimoniumTransactorSession struct {
	Contract     *TestimoniumTransactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts      // Transaction auth options to use throughout this session
}

TestimoniumTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

func (*TestimoniumTransactorSession) DisputeBlock

func (_Testimonium *TestimoniumTransactorSession) DisputeBlock(blockHash [32]byte, dataSetLookup []*big.Int, witnessForLookup []*big.Int) (*types.Transaction, error)

DisputeBlock is a paid mutator transaction binding the contract method 0x66962b26.

Solidity: function disputeBlock(bytes32 blockHash, uint256[] dataSetLookup, uint256[] witnessForLookup) returns()

func (*TestimoniumTransactorSession) SubmitHeader

func (_Testimonium *TestimoniumTransactorSession) SubmitHeader(_rlpHeader []byte) (*types.Transaction, error)

SubmitHeader is a paid mutator transaction binding the contract method 0xc565ba10.

Solidity: function submitHeader(bytes _rlpHeader) returns()

type TotalDifficulty

type TotalDifficulty struct {
	TotalDifficulty string `json:"totalDifficulty"       gencodec:"required"`
}

type TrieValueType

type TrieValueType int
const (
	VALUE_TYPE_TRANSACTION TrieValueType = 0
	VALUE_TYPE_RECEIPT     TrieValueType = 1
	VALUE_TYPE_STATE       TrieValueType = 2
)

Jump to

Keyboard shortcuts

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