contract

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 13 Imported by: 4

Documentation

Index

Constants

View Source
const (
	LIFETIME_MONTHES         = 3
	BYTES_PER_SECTOR         = 256
	ANNUAL_ZGS_TOKENS_PER_GB = 10
	GB                       = 1024 * 1024 * 1024
	MONTH_PER_YEAR           = 12
)

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: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"InvalidSubmission\",\"type\":\"error\"},{\"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\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"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\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"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\":\"submissions\",\"type\":\"tuple[]\"}],\"name\":\"batchSubmit\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"indexes\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"digests\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"startIndexes\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"lengths\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"commitRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"epochStartPosition\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"firstBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\":\"makeContextWithResult\",\"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\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_length\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"alignExp\",\"type\":\"uint256\"}],\"name\":\"nextAlign\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_length\",\"type\":\"uint256\"}],\"name\":\"nextPow2\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"numSubmissions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"targetPosition\",\"type\":\"uint128\"}],\"name\":\"queryContextAtPosition\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"start\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"end\",\"type\":\"uint128\"},{\"internalType\":\"bytes32\",\"name\":\"digest\",\"type\":\"bytes32\"}],\"internalType\":\"structEpochRangeWithContextDigest\",\"name\":\"range\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"root\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rootHistory\",\"outputs\":[{\"internalType\":\"contractIDigestHistory\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"submissionIndex\",\"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\"},{\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unstagedHeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"height\",\"type\":\"uint256\"}],\"name\":\"zeros\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"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 EpochRangeWithContextDigest

type EpochRangeWithContextDigest struct {
	Start  *big.Int
	End    *big.Int
	Digest [32]byte
}

EpochRangeWithContextDigest 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) CurrentLength

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

CurrentLength is a free data retrieval call binding the contract method 0xa3d35f36.

Solidity: function currentLength() view returns(uint256)

func (*FlowCaller) Epoch

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

Epoch is a free data retrieval call binding the contract method 0x900cf0cf.

Solidity: function epoch() view returns(uint256)

func (*FlowCaller) EpochStartPosition

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

EpochStartPosition is a free data retrieval call binding the contract method 0x93e405a0.

Solidity: function epochStartPosition() view returns(uint256)

func (*FlowCaller) FirstBlock

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

FirstBlock is a free data retrieval call binding the contract method 0x231b0268.

Solidity: function firstBlock() view returns(uint256)

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) NextAlign

func (_Flow *FlowCaller) NextAlign(opts *bind.CallOpts, _length *big.Int, alignExp *big.Int) (*big.Int, error)

NextAlign is a free data retrieval call binding the contract method 0x555430a1.

Solidity: function nextAlign(uint256 _length, uint256 alignExp) pure returns(uint256)

func (*FlowCaller) NextPow2

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

NextPow2 is a free data retrieval call binding the contract method 0x3d75d9c2.

Solidity: function nextPow2(uint256 _length) pure returns(uint256)

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)

func (*FlowCaller) Paused

func (_Flow *FlowCaller) Paused(opts *bind.CallOpts) (bool, error)

Paused is a free data retrieval call binding the contract method 0x5c975abb.

Solidity: function paused() view returns(bool)

func (*FlowCaller) Root

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

Root is a free data retrieval call binding the contract method 0xebf0c717.

Solidity: function root() view returns(bytes32)

func (*FlowCaller) RootHistory

func (_Flow *FlowCaller) RootHistory(opts *bind.CallOpts) (common.Address, error)

RootHistory is a free data retrieval call binding the contract method 0xc7dd5221.

Solidity: function rootHistory() view returns(address)

func (*FlowCaller) SubmissionIndex

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

SubmissionIndex is a free data retrieval call binding the contract method 0xb8a409ac.

Solidity: function submissionIndex() view returns(uint256)

func (*FlowCaller) Token

func (_Flow *FlowCaller) Token(opts *bind.CallOpts) (common.Address, error)

Token is a free data retrieval call binding the contract method 0xfc0c546a.

Solidity: function token() view returns(address)

func (*FlowCaller) UnstagedHeight

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

UnstagedHeight is a free data retrieval call binding the contract method 0x364800ec.

Solidity: function unstagedHeight() view returns(uint256)

func (*FlowCaller) Zeros

func (_Flow *FlowCaller) Zeros(opts *bind.CallOpts, height *big.Int) ([32]byte, error)

Zeros is a free data retrieval call binding the contract method 0xe8295588.

Solidity: function zeros(uint256 height) pure returns(bytes32)

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) CurrentLength

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

CurrentLength is a free data retrieval call binding the contract method 0xa3d35f36.

Solidity: function currentLength() view returns(uint256)

func (*FlowCallerSession) Epoch

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

Epoch is a free data retrieval call binding the contract method 0x900cf0cf.

Solidity: function epoch() view returns(uint256)

func (*FlowCallerSession) EpochStartPosition

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

EpochStartPosition is a free data retrieval call binding the contract method 0x93e405a0.

Solidity: function epochStartPosition() view returns(uint256)

func (*FlowCallerSession) FirstBlock

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

FirstBlock is a free data retrieval call binding the contract method 0x231b0268.

Solidity: function firstBlock() view returns(uint256)

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) NextAlign

func (_Flow *FlowCallerSession) NextAlign(_length *big.Int, alignExp *big.Int) (*big.Int, error)

NextAlign is a free data retrieval call binding the contract method 0x555430a1.

Solidity: function nextAlign(uint256 _length, uint256 alignExp) pure returns(uint256)

func (*FlowCallerSession) NextPow2

func (_Flow *FlowCallerSession) NextPow2(_length *big.Int) (*big.Int, error)

NextPow2 is a free data retrieval call binding the contract method 0x3d75d9c2.

Solidity: function nextPow2(uint256 _length) pure returns(uint256)

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)

func (*FlowCallerSession) Paused

func (_Flow *FlowCallerSession) Paused() (bool, error)

Paused is a free data retrieval call binding the contract method 0x5c975abb.

Solidity: function paused() view returns(bool)

func (*FlowCallerSession) Root

func (_Flow *FlowCallerSession) Root() ([32]byte, error)

Root is a free data retrieval call binding the contract method 0xebf0c717.

Solidity: function root() view returns(bytes32)

func (*FlowCallerSession) RootHistory

func (_Flow *FlowCallerSession) RootHistory() (common.Address, error)

RootHistory is a free data retrieval call binding the contract method 0xc7dd5221.

Solidity: function rootHistory() view returns(address)

func (*FlowCallerSession) SubmissionIndex

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

SubmissionIndex is a free data retrieval call binding the contract method 0xb8a409ac.

Solidity: function submissionIndex() view returns(uint256)

func (*FlowCallerSession) Token

func (_Flow *FlowCallerSession) Token() (common.Address, error)

Token is a free data retrieval call binding the contract method 0xfc0c546a.

Solidity: function token() view returns(address)

func (*FlowCallerSession) UnstagedHeight

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

UnstagedHeight is a free data retrieval call binding the contract method 0x364800ec.

Solidity: function unstagedHeight() view returns(uint256)

func (*FlowCallerSession) Zeros

func (_Flow *FlowCallerSession) Zeros(height *big.Int) ([32]byte, error)

Zeros is a free data retrieval call binding the contract method 0xe8295588.

Solidity: function zeros(uint256 height) pure returns(bytes32)

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) FilterPaused

func (_Flow *FlowFilterer) FilterPaused(opts *bind.FilterOpts) (*FlowPausedIterator, error)

FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.

Solidity: event Paused(address account)

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) FilterUnpaused

func (_Flow *FlowFilterer) FilterUnpaused(opts *bind.FilterOpts) (*FlowUnpausedIterator, error)

FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.

Solidity: event Unpaused(address account)

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) ParsePaused

func (_Flow *FlowFilterer) ParsePaused(log types.Log) (*FlowPaused, error)

ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.

Solidity: event Paused(address account)

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) ParseUnpaused

func (_Flow *FlowFilterer) ParseUnpaused(log types.Log) (*FlowUnpaused, error)

ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.

Solidity: event Unpaused(address account)

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) WatchPaused

func (_Flow *FlowFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *FlowPaused) (event.Subscription, error)

WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258.

Solidity: event Paused(address account)

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)

func (*FlowFilterer) WatchUnpaused

func (_Flow *FlowFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *FlowUnpaused) (event.Subscription, error)

WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa.

Solidity: event Unpaused(address account)

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 FlowPaused

type FlowPaused struct {
	Account common.Address
	Raw     types.Log // Blockchain specific contextual infos
}

FlowPaused represents a Paused event raised by the Flow contract.

type FlowPausedIterator

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

FlowPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the Flow contract.

func (*FlowPausedIterator) Close

func (it *FlowPausedIterator) Close() error

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

func (*FlowPausedIterator) Error

func (it *FlowPausedIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*FlowPausedIterator) Next

func (it *FlowPausedIterator) 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) BatchSubmit

func (_Flow *FlowSession) BatchSubmit(submissions []Submission) (*types.Transaction, error)

BatchSubmit is a paid mutator transaction binding the contract method 0x9e62a38e.

Solidity: function batchSubmit((uint256,bytes,(bytes32,uint256)[])[] submissions) returns(uint256[] indexes, bytes32[] digests, uint256[] startIndexes, uint256[] lengths)

func (*FlowSession) CommitRoot

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

CommitRoot is a paid mutator transaction binding the contract method 0xd34353c9.

Solidity: function commitRoot() returns()

func (*FlowSession) CurrentLength

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

CurrentLength is a free data retrieval call binding the contract method 0xa3d35f36.

Solidity: function currentLength() view returns(uint256)

func (*FlowSession) Epoch

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

Epoch is a free data retrieval call binding the contract method 0x900cf0cf.

Solidity: function epoch() view returns(uint256)

func (*FlowSession) EpochStartPosition

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

EpochStartPosition is a free data retrieval call binding the contract method 0x93e405a0.

Solidity: function epochStartPosition() view returns(uint256)

func (*FlowSession) FirstBlock

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

FirstBlock is a free data retrieval call binding the contract method 0x231b0268.

Solidity: function firstBlock() view returns(uint256)

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) MakeContextWithResult

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

MakeContextWithResult is a paid mutator transaction binding the contract method 0xb464b53e.

Solidity: function makeContextWithResult() returns((uint256,uint256,bytes32,uint256,bytes32,bytes32))

func (*FlowSession) NextAlign

func (_Flow *FlowSession) NextAlign(_length *big.Int, alignExp *big.Int) (*big.Int, error)

NextAlign is a free data retrieval call binding the contract method 0x555430a1.

Solidity: function nextAlign(uint256 _length, uint256 alignExp) pure returns(uint256)

func (*FlowSession) NextPow2

func (_Flow *FlowSession) NextPow2(_length *big.Int) (*big.Int, error)

NextPow2 is a free data retrieval call binding the contract method 0x3d75d9c2.

Solidity: function nextPow2(uint256 _length) pure returns(uint256)

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) Paused

func (_Flow *FlowSession) Paused() (bool, error)

Paused is a free data retrieval call binding the contract method 0x5c975abb.

Solidity: function paused() view returns(bool)

func (*FlowSession) QueryContextAtPosition

func (_Flow *FlowSession) QueryContextAtPosition(targetPosition *big.Int) (*types.Transaction, error)

QueryContextAtPosition is a paid mutator transaction binding the contract method 0x31bae174.

Solidity: function queryContextAtPosition(uint128 targetPosition) returns((uint128,uint128,bytes32) range)

func (*FlowSession) Root

func (_Flow *FlowSession) Root() ([32]byte, error)

Root is a free data retrieval call binding the contract method 0xebf0c717.

Solidity: function root() view returns(bytes32)

func (*FlowSession) RootHistory

func (_Flow *FlowSession) RootHistory() (common.Address, error)

RootHistory is a free data retrieval call binding the contract method 0xc7dd5221.

Solidity: function rootHistory() view returns(address)

func (*FlowSession) SubmissionIndex

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

SubmissionIndex is a free data retrieval call binding the contract method 0xb8a409ac.

Solidity: function submissionIndex() 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)

func (*FlowSession) Token

func (_Flow *FlowSession) Token() (common.Address, error)

Token is a free data retrieval call binding the contract method 0xfc0c546a.

Solidity: function token() view returns(address)

func (*FlowSession) UnstagedHeight

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

UnstagedHeight is a free data retrieval call binding the contract method 0x364800ec.

Solidity: function unstagedHeight() view returns(uint256)

func (*FlowSession) Zeros

func (_Flow *FlowSession) Zeros(height *big.Int) ([32]byte, error)

Zeros is a free data retrieval call binding the contract method 0xe8295588.

Solidity: function zeros(uint256 height) pure returns(bytes32)

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) BatchSubmit

func (_Flow *FlowTransactor) BatchSubmit(opts *bind.TransactOpts, submissions []Submission) (*types.Transaction, error)

BatchSubmit is a paid mutator transaction binding the contract method 0x9e62a38e.

Solidity: function batchSubmit((uint256,bytes,(bytes32,uint256)[])[] submissions) returns(uint256[] indexes, bytes32[] digests, uint256[] startIndexes, uint256[] lengths)

func (*FlowTransactor) CommitRoot

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

CommitRoot is a paid mutator transaction binding the contract method 0xd34353c9.

Solidity: function commitRoot() returns()

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) MakeContextWithResult

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

MakeContextWithResult is a paid mutator transaction binding the contract method 0xb464b53e.

Solidity: function makeContextWithResult() returns((uint256,uint256,bytes32,uint256,bytes32,bytes32))

func (*FlowTransactor) QueryContextAtPosition

func (_Flow *FlowTransactor) QueryContextAtPosition(opts *bind.TransactOpts, targetPosition *big.Int) (*types.Transaction, error)

QueryContextAtPosition is a paid mutator transaction binding the contract method 0x31bae174.

Solidity: function queryContextAtPosition(uint128 targetPosition) returns((uint128,uint128,bytes32) range)

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) BatchSubmit

func (_Flow *FlowTransactorSession) BatchSubmit(submissions []Submission) (*types.Transaction, error)

BatchSubmit is a paid mutator transaction binding the contract method 0x9e62a38e.

Solidity: function batchSubmit((uint256,bytes,(bytes32,uint256)[])[] submissions) returns(uint256[] indexes, bytes32[] digests, uint256[] startIndexes, uint256[] lengths)

func (*FlowTransactorSession) CommitRoot

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

CommitRoot is a paid mutator transaction binding the contract method 0xd34353c9.

Solidity: function commitRoot() returns()

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) MakeContextWithResult

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

MakeContextWithResult is a paid mutator transaction binding the contract method 0xb464b53e.

Solidity: function makeContextWithResult() returns((uint256,uint256,bytes32,uint256,bytes32,bytes32))

func (*FlowTransactorSession) QueryContextAtPosition

func (_Flow *FlowTransactorSession) QueryContextAtPosition(targetPosition *big.Int) (*types.Transaction, error)

QueryContextAtPosition is a paid mutator transaction binding the contract method 0x31bae174.

Solidity: function queryContextAtPosition(uint128 targetPosition) returns((uint128,uint128,bytes32) range)

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 FlowUnpaused

type FlowUnpaused struct {
	Account common.Address
	Raw     types.Log // Blockchain specific contextual infos
}

FlowUnpaused represents a Unpaused event raised by the Flow contract.

type FlowUnpausedIterator

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

FlowUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the Flow contract.

func (*FlowUnpausedIterator) Close

func (it *FlowUnpausedIterator) Close() error

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

func (*FlowUnpausedIterator) Error

func (it *FlowUnpausedIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*FlowUnpausedIterator) Next

func (it *FlowUnpausedIterator) 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 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) Fee added in v0.1.15

func (submission Submission) Fee() *big.Int

func (Submission) Root

func (submission Submission) Root() common.Hash

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