contract

package
v0.0.0-...-cd21dfb Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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\":\"structSubmissionNode[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structSubmission\",\"name\":\"submission\",\"type\":\"tuple\"}],\"name\":\"Submit\",\"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\":\"structSubmissionNode[]\",\"name\":\"nodes\",\"type\":\"tuple[]\"}],\"internalType\":\"structSubmission\",\"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

This section is empty.

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 FlowContract

type FlowContract struct {
	*blockchain.Contract
	*Flow
}

func NewFlowContract

func NewFlowContract(flowAddress common.Address, clientWithSigner *web3go.Client) (*FlowContract, 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) FilterSubmit

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

FilterSubmit is a free log retrieval operation binding the contract event 0x167ce04d2aa1981994d3a31695da0d785373335b1078cec239a1a3a2c7675555.

Solidity: event Submit(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) ParseSubmit

func (_Flow *FlowFilterer) ParseSubmit(log types.Log) (*FlowSubmit, error)

ParseSubmit is a log parse operation binding the contract event 0x167ce04d2aa1981994d3a31695da0d785373335b1078cec239a1a3a2c7675555.

Solidity: event Submit(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) WatchSubmit

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

WatchSubmit is a free log subscription operation binding the contract event 0x167ce04d2aa1981994d3a31695da0d785373335b1078cec239a1a3a2c7675555.

Solidity: event Submit(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 Submission) (*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 FlowSubmit

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

FlowSubmit represents a Submit event raised by the Flow contract.

type FlowSubmitIterator

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

FlowSubmitIterator is returned from FilterSubmit and is used to iterate over the raw logs and unpacked data for Submit events raised by the Flow contract.

func (*FlowSubmitIterator) Close

func (it *FlowSubmitIterator) Close() error

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

func (*FlowSubmitIterator) Error

func (it *FlowSubmitIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*FlowSubmitIterator) Next

func (it *FlowSubmitIterator) 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 Submission) (*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 Submission) (*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 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.

type Submission

type Submission struct {
	Length *big.Int
	Tags   []byte
	Nodes  []SubmissionNode
}

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

func (Submission) String

func (submission Submission) String() string

type SubmissionNode

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

SubmissionNode 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