contract

package
v0.0.0-...-0866dc8 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CustomGasLimit uint64
View Source
var CustomGasPrice uint64
View Source
var FlowABI = FlowMetaData.ABI

FlowABI is the input ABI used to generate the binding from. Deprecated: Use FlowMetaData.ABI instead.

View Source
var FlowMetaData = &bind.MetaData{
	ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"startMerkleRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"submissionIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"flowLength\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"context\",\"type\":\"bytes32\"}],\"name\":\"NewEpoch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"identity\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"submissionIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"startPos\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"tags\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"height\",\"type\":\"uint256\"}],\"internalType\":\"structIonianSubmissionNode[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structIonianSubmission\",\"name\":\"submission\",\"type\":\"tuple\"}],\"name\":\"Submission\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"getContext\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"epoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"mineStart\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"flowRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"flowLength\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"blockDigest\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"digest\",\"type\":\"bytes32\"}],\"internalType\":\"structMineContext\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"digest\",\"type\":\"bytes32\"}],\"name\":\"getEpochRange\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"start\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"end\",\"type\":\"uint128\"}],\"internalType\":\"structEpochRange\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"makeContext\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"numSubmissions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"tags\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"height\",\"type\":\"uint256\"}],\"internalType\":\"structIonianSubmissionNode[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"internalType\":\"structIonianSubmission\",\"name\":\"submission\",\"type\":\"tuple\"}],\"name\":\"submit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
}

FlowMetaData contains all meta data concerning the Flow contract.

Functions

func ConvertToGethLog

func ConvertToGethLog(log *types.Log) *gethTypes.Log

func Deploy

func Deploy(clientWithSigner *web3go.Client, dataOrFile string) (common.Address, error)

func WaitForReceipt

func WaitForReceipt(client *web3go.Client, txHash common.Hash, successRequired bool, pollInterval ...time.Duration) (receipt *types.Receipt, err error)

Types

type EpochRange

type EpochRange struct {
	Start *big.Int
	End   *big.Int
}

EpochRange is an auto generated low-level Go binding around an user-defined struct.

type Flow

type Flow struct {
	FlowCaller     // Read-only binding to the contract
	FlowTransactor // Write-only binding to the contract
	FlowFilterer   // Log filterer for contract events
}

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

func NewFlow

func NewFlow(address common.Address, backend bind.ContractBackend) (*Flow, error)

NewFlow creates a new instance of Flow, bound to a specific deployed contract.

type FlowCaller

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

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

func NewFlowCaller

func NewFlowCaller(address common.Address, caller bind.ContractCaller) (*FlowCaller, error)

NewFlowCaller creates a new read-only instance of Flow, bound to a specific deployed contract.

func (*FlowCaller) GetContext

func (_Flow *FlowCaller) GetContext(opts *bind.CallOpts) (MineContext, error)

GetContext is a free data retrieval call binding the contract method 0x127f0f07.

Solidity: function getContext() view returns((uint256,uint256,bytes32,uint256,bytes32,bytes32))

func (*FlowCaller) GetEpochRange

func (_Flow *FlowCaller) GetEpochRange(opts *bind.CallOpts, digest [32]byte) (EpochRange, error)

GetEpochRange is a free data retrieval call binding the contract method 0x7d590708.

Solidity: function getEpochRange(bytes32 digest) view returns((uint128,uint128))

func (*FlowCaller) NumSubmissions

func (_Flow *FlowCaller) NumSubmissions(opts *bind.CallOpts) (*big.Int, error)

NumSubmissions is a free data retrieval call binding the contract method 0x77e19824.

Solidity: function numSubmissions() view returns(uint256)

type FlowCallerRaw

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

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

func (*FlowCallerRaw) Call

func (_Flow *FlowCallerRaw) 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 FlowCallerSession

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

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

func (*FlowCallerSession) GetContext

func (_Flow *FlowCallerSession) GetContext() (MineContext, error)

GetContext is a free data retrieval call binding the contract method 0x127f0f07.

Solidity: function getContext() view returns((uint256,uint256,bytes32,uint256,bytes32,bytes32))

func (*FlowCallerSession) GetEpochRange

func (_Flow *FlowCallerSession) GetEpochRange(digest [32]byte) (EpochRange, error)

GetEpochRange is a free data retrieval call binding the contract method 0x7d590708.

Solidity: function getEpochRange(bytes32 digest) view returns((uint128,uint128))

func (*FlowCallerSession) NumSubmissions

func (_Flow *FlowCallerSession) NumSubmissions() (*big.Int, error)

NumSubmissions is a free data retrieval call binding the contract method 0x77e19824.

Solidity: function numSubmissions() view returns(uint256)

type FlowExt

type FlowExt struct {
	*Flow
	// contains filtered or unexported fields
}

func NewFlowExt

func NewFlowExt(flowAddress common.Address, clientWithSigner *web3go.Client) (*FlowExt, error)

func (FlowExt) CreateTransactOpts

func (c FlowExt) CreateTransactOpts() (*bind.TransactOpts, error)

func (*FlowExt) SubmitExt

func (flow *FlowExt) SubmitExt(submission IonianSubmission) (common.Hash, error)

func (FlowExt) WaitForReceipt

func (c FlowExt) WaitForReceipt(txHash common.Hash, successRequired bool, pollInterval ...time.Duration) (*types.Receipt, error)

type FlowFilterer

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

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

func NewFlowFilterer

func NewFlowFilterer(address common.Address, filterer bind.ContractFilterer) (*FlowFilterer, error)

NewFlowFilterer creates a new log filterer instance of Flow, bound to a specific deployed contract.

func (*FlowFilterer) FilterNewEpoch

func (_Flow *FlowFilterer) FilterNewEpoch(opts *bind.FilterOpts, sender []common.Address, index []*big.Int) (*FlowNewEpochIterator, error)

FilterNewEpoch is a free log retrieval operation binding the contract event 0xbc8a3fd82465d43f1709e44ed882f7e1af0147274196ef1ec009f5d52ff4e993.

Solidity: event NewEpoch(address indexed sender, uint256 indexed index, bytes32 startMerkleRoot, uint256 submissionIndex, uint256 flowLength, bytes32 context)

func (*FlowFilterer) FilterSubmission

func (_Flow *FlowFilterer) FilterSubmission(opts *bind.FilterOpts, sender []common.Address, identity [][32]byte) (*FlowSubmissionIterator, error)

FilterSubmission is a free log retrieval operation binding the contract event 0x398e4f14f8588468d3654c03dc3f266e5af46083542d34db23fb04953067194b.

Solidity: event Submission(address indexed sender, bytes32 indexed identity, uint256 submissionIndex, uint256 startPos, uint256 length, (uint256,bytes,(bytes32,uint256)[]) submission)

func (*FlowFilterer) ParseNewEpoch

func (_Flow *FlowFilterer) ParseNewEpoch(log types.Log) (*FlowNewEpoch, error)

ParseNewEpoch is a log parse operation binding the contract event 0xbc8a3fd82465d43f1709e44ed882f7e1af0147274196ef1ec009f5d52ff4e993.

Solidity: event NewEpoch(address indexed sender, uint256 indexed index, bytes32 startMerkleRoot, uint256 submissionIndex, uint256 flowLength, bytes32 context)

func (*FlowFilterer) ParseSubmission

func (_Flow *FlowFilterer) ParseSubmission(log types.Log) (*FlowSubmission, error)

ParseSubmission is a log parse operation binding the contract event 0x398e4f14f8588468d3654c03dc3f266e5af46083542d34db23fb04953067194b.

Solidity: event Submission(address indexed sender, bytes32 indexed identity, uint256 submissionIndex, uint256 startPos, uint256 length, (uint256,bytes,(bytes32,uint256)[]) submission)

func (*FlowFilterer) WatchNewEpoch

func (_Flow *FlowFilterer) WatchNewEpoch(opts *bind.WatchOpts, sink chan<- *FlowNewEpoch, sender []common.Address, index []*big.Int) (event.Subscription, error)

WatchNewEpoch is a free log subscription operation binding the contract event 0xbc8a3fd82465d43f1709e44ed882f7e1af0147274196ef1ec009f5d52ff4e993.

Solidity: event NewEpoch(address indexed sender, uint256 indexed index, bytes32 startMerkleRoot, uint256 submissionIndex, uint256 flowLength, bytes32 context)

func (*FlowFilterer) WatchSubmission

func (_Flow *FlowFilterer) WatchSubmission(opts *bind.WatchOpts, sink chan<- *FlowSubmission, sender []common.Address, identity [][32]byte) (event.Subscription, error)

WatchSubmission is a free log subscription operation binding the contract event 0x398e4f14f8588468d3654c03dc3f266e5af46083542d34db23fb04953067194b.

Solidity: event Submission(address indexed sender, bytes32 indexed identity, uint256 submissionIndex, uint256 startPos, uint256 length, (uint256,bytes,(bytes32,uint256)[]) submission)

type FlowNewEpoch

type FlowNewEpoch struct {
	Sender          common.Address
	Index           *big.Int
	StartMerkleRoot [32]byte
	SubmissionIndex *big.Int
	FlowLength      *big.Int
	Context         [32]byte
	Raw             types.Log // Blockchain specific contextual infos
}

FlowNewEpoch represents a NewEpoch event raised by the Flow contract.

type FlowNewEpochIterator

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

FlowNewEpochIterator is returned from FilterNewEpoch and is used to iterate over the raw logs and unpacked data for NewEpoch events raised by the Flow contract.

func (*FlowNewEpochIterator) Close

func (it *FlowNewEpochIterator) Close() error

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

func (*FlowNewEpochIterator) Error

func (it *FlowNewEpochIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*FlowNewEpochIterator) Next

func (it *FlowNewEpochIterator) Next() bool

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 FlowRaw

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

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

func (*FlowRaw) Call

func (_Flow *FlowRaw) 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 (*FlowRaw) Transact

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

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

func (*FlowRaw) Transfer

func (_Flow *FlowRaw) 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 FlowSession

type FlowSession struct {
	Contract     *Flow             // 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
}

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

func (*FlowSession) GetContext

func (_Flow *FlowSession) GetContext() (MineContext, error)

GetContext is a free data retrieval call binding the contract method 0x127f0f07.

Solidity: function getContext() view returns((uint256,uint256,bytes32,uint256,bytes32,bytes32))

func (*FlowSession) GetEpochRange

func (_Flow *FlowSession) GetEpochRange(digest [32]byte) (EpochRange, error)

GetEpochRange is a free data retrieval call binding the contract method 0x7d590708.

Solidity: function getEpochRange(bytes32 digest) view returns((uint128,uint128))

func (*FlowSession) MakeContext

func (_Flow *FlowSession) MakeContext() (*types.Transaction, error)

MakeContext is a paid mutator transaction binding the contract method 0x38d45e10.

Solidity: function makeContext() returns()

func (*FlowSession) NumSubmissions

func (_Flow *FlowSession) NumSubmissions() (*big.Int, error)

NumSubmissions is a free data retrieval call binding the contract method 0x77e19824.

Solidity: function numSubmissions() view returns(uint256)

func (*FlowSession) Submit

func (_Flow *FlowSession) Submit(submission IonianSubmission) (*types.Transaction, error)

Submit is a paid mutator transaction binding the contract method 0xef3e12dc.

Solidity: function submit((uint256,bytes,(bytes32,uint256)[]) submission) returns(uint256, bytes32, uint256, uint256)

type FlowSubmission

type FlowSubmission struct {
	Sender          common.Address
	Identity        [32]byte
	SubmissionIndex *big.Int
	StartPos        *big.Int
	Length          *big.Int
	Submission      IonianSubmission
	Raw             types.Log // Blockchain specific contextual infos
}

FlowSubmission represents a Submission event raised by the Flow contract.

type FlowSubmissionIterator

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

FlowSubmissionIterator is returned from FilterSubmission and is used to iterate over the raw logs and unpacked data for Submission events raised by the Flow contract.

func (*FlowSubmissionIterator) Close

func (it *FlowSubmissionIterator) Close() error

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

func (*FlowSubmissionIterator) Error

func (it *FlowSubmissionIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*FlowSubmissionIterator) Next

func (it *FlowSubmissionIterator) Next() bool

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 FlowTransactor

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

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

func NewFlowTransactor

func NewFlowTransactor(address common.Address, transactor bind.ContractTransactor) (*FlowTransactor, error)

NewFlowTransactor creates a new write-only instance of Flow, bound to a specific deployed contract.

func (*FlowTransactor) MakeContext

func (_Flow *FlowTransactor) MakeContext(opts *bind.TransactOpts) (*types.Transaction, error)

MakeContext is a paid mutator transaction binding the contract method 0x38d45e10.

Solidity: function makeContext() returns()

func (*FlowTransactor) Submit

func (_Flow *FlowTransactor) Submit(opts *bind.TransactOpts, submission IonianSubmission) (*types.Transaction, error)

Submit is a paid mutator transaction binding the contract method 0xef3e12dc.

Solidity: function submit((uint256,bytes,(bytes32,uint256)[]) submission) returns(uint256, bytes32, uint256, uint256)

type FlowTransactorRaw

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

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

func (*FlowTransactorRaw) Transact

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

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

func (*FlowTransactorRaw) Transfer

func (_Flow *FlowTransactorRaw) 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 FlowTransactorSession

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

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

func (*FlowTransactorSession) MakeContext

func (_Flow *FlowTransactorSession) MakeContext() (*types.Transaction, error)

MakeContext is a paid mutator transaction binding the contract method 0x38d45e10.

Solidity: function makeContext() returns()

func (*FlowTransactorSession) Submit

func (_Flow *FlowTransactorSession) Submit(submission IonianSubmission) (*types.Transaction, error)

Submit is a paid mutator transaction binding the contract method 0xef3e12dc.

Solidity: function submit((uint256,bytes,(bytes32,uint256)[]) submission) returns(uint256, bytes32, uint256, uint256)

type IonianSubmission

type IonianSubmission struct {
	Length *big.Int
	Tags   []byte
	Nodes  []IonianSubmissionNode
}

IonianSubmission is an auto generated low-level Go binding around an user-defined struct.

func (IonianSubmission) String

func (submission IonianSubmission) String() string

type IonianSubmissionNode

type IonianSubmissionNode struct {
	Root   [32]byte
	Height *big.Int
}

IonianSubmissionNode is an auto generated low-level Go binding around an user-defined struct.

type MineContext

type MineContext struct {
	Epoch       *big.Int
	MineStart   *big.Int
	FlowRoot    [32]byte
	FlowLength  *big.Int
	BlockDigest [32]byte
	Digest      [32]byte
}

MineContext is an auto generated low-level Go binding around an user-defined struct.

Jump to

Keyboard shortcuts

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