contract

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: MIT Imports: 14 Imported by: 5

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\":[{\"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\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"blocksPerEpoch\",\"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\":[{\"internalType\":\"uint256\",\"name\":\"cnt\",\"type\":\"uint256\"}],\"name\":\"makeContextFixedTimes\",\"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\":[],\"name\":\"market\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"numSubmissions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"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\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"tree\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"currentLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unstagedHeight\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
}

FlowMetaData contains all meta data concerning the Flow contract.

View Source
var MarketABI = MarketMetaData.ABI

MarketABI is the input ABI used to generate the binding from. Deprecated: Use MarketMetaData.ABI instead.

View Source
var MarketMetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"beforeLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"uploadSectors\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"paddingSectors\",\"type\":\"uint256\"}],\"name\":\"chargeFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"flow\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pricePerSector\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reward\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"pricePerSector_\",\"type\":\"uint256\"}],\"name\":\"setPricePerSector\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
}

MarketMetaData contains all meta data concerning the Market 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) BlocksPerEpoch added in v0.4.1

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

BlocksPerEpoch is a free data retrieval call binding the contract method 0xf0682054.

Solidity: function blocksPerEpoch() 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) Market added in v0.4.1

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

Market is a free data retrieval call binding the contract method 0x80f55605.

Solidity: function market() view returns(address)

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) 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) Tree added in v0.4.1

func (_Flow *FlowCaller) Tree(opts *bind.CallOpts) (struct {
	CurrentLength  *big.Int
	UnstagedHeight *big.Int
}, error)

Tree is a free data retrieval call binding the contract method 0xfd54b228.

Solidity: function tree() view returns(uint256 currentLength, uint256 unstagedHeight)

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) BlocksPerEpoch added in v0.4.1

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

BlocksPerEpoch is a free data retrieval call binding the contract method 0xf0682054.

Solidity: function blocksPerEpoch() 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) Market added in v0.4.1

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

Market is a free data retrieval call binding the contract method 0x80f55605.

Solidity: function market() view returns(address)

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) 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) Tree added in v0.4.1

func (_Flow *FlowCallerSession) Tree() (struct {
	CurrentLength  *big.Int
	UnstagedHeight *big.Int
}, error)

Tree is a free data retrieval call binding the contract method 0xfd54b228.

Solidity: function tree() view returns(uint256 currentLength, uint256 unstagedHeight)

type FlowContract

type FlowContract struct {
	*blockchain.Contract
	*Flow
	// contains filtered or unexported fields
}

func NewFlowContract

func NewFlowContract(flowAddress common.Address, clientWithSigner *web3go.Client) (*FlowContract, error)

func (*FlowContract) GetMarketContract added in v0.4.1

func (f *FlowContract) GetMarketContract(ctx context.Context) (*Market, 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) 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) payable returns(uint256[] indexes, bytes32[] digests, uint256[] startIndexes, uint256[] lengths)

func (*FlowSession) BlocksPerEpoch added in v0.4.1

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

BlocksPerEpoch is a free data retrieval call binding the contract method 0xf0682054.

Solidity: function blocksPerEpoch() 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) MakeContextFixedTimes added in v0.4.1

func (_Flow *FlowSession) MakeContextFixedTimes(cnt *big.Int) (*types.Transaction, error)

MakeContextFixedTimes is a paid mutator transaction binding the contract method 0x18a641ef.

Solidity: function makeContextFixedTimes(uint256 cnt) 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) Market added in v0.4.1

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

Market is a free data retrieval call binding the contract method 0x80f55605.

Solidity: function market() view returns(address)

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) 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) 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) payable returns(uint256, bytes32, uint256, uint256)

func (*FlowSession) Tree added in v0.4.1

func (_Flow *FlowSession) Tree() (struct {
	CurrentLength  *big.Int
	UnstagedHeight *big.Int
}, error)

Tree is a free data retrieval call binding the contract method 0xfd54b228.

Solidity: function tree() view returns(uint256 currentLength, uint256 unstagedHeight)

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) payable returns(uint256[] indexes, bytes32[] digests, uint256[] startIndexes, uint256[] lengths)

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) MakeContextFixedTimes added in v0.4.1

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

MakeContextFixedTimes is a paid mutator transaction binding the contract method 0x18a641ef.

Solidity: function makeContextFixedTimes(uint256 cnt) 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) payable 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) payable returns(uint256[] indexes, bytes32[] digests, uint256[] startIndexes, uint256[] lengths)

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) MakeContextFixedTimes added in v0.4.1

func (_Flow *FlowTransactorSession) MakeContextFixedTimes(cnt *big.Int) (*types.Transaction, error)

MakeContextFixedTimes is a paid mutator transaction binding the contract method 0x18a641ef.

Solidity: function makeContextFixedTimes(uint256 cnt) 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) payable returns(uint256, bytes32, uint256, uint256)

type Market added in v0.4.1

type Market struct {
	MarketCaller     // Read-only binding to the contract
	MarketTransactor // Write-only binding to the contract
	MarketFilterer   // Log filterer for contract events
}

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

func NewMarket added in v0.4.1

func NewMarket(address common.Address, backend bind.ContractBackend) (*Market, error)

NewMarket creates a new instance of Market, bound to a specific deployed contract.

type MarketCaller added in v0.4.1

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

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

func NewMarketCaller added in v0.4.1

func NewMarketCaller(address common.Address, caller bind.ContractCaller) (*MarketCaller, error)

NewMarketCaller creates a new read-only instance of Market, bound to a specific deployed contract.

func (*MarketCaller) Flow added in v0.4.1

func (_Market *MarketCaller) Flow(opts *bind.CallOpts) (common.Address, error)

Flow is a free data retrieval call binding the contract method 0x343aad82.

Solidity: function flow() view returns(address)

func (*MarketCaller) PricePerSector added in v0.4.1

func (_Market *MarketCaller) PricePerSector(opts *bind.CallOpts) (*big.Int, error)

PricePerSector is a free data retrieval call binding the contract method 0x61ec5082.

Solidity: function pricePerSector() view returns(uint256)

func (*MarketCaller) Reward added in v0.4.1

func (_Market *MarketCaller) Reward(opts *bind.CallOpts) (common.Address, error)

Reward is a free data retrieval call binding the contract method 0x228cb733.

Solidity: function reward() view returns(address)

type MarketCallerRaw added in v0.4.1

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

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

func (*MarketCallerRaw) Call added in v0.4.1

func (_Market *MarketCallerRaw) 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 MarketCallerSession added in v0.4.1

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

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

func (*MarketCallerSession) Flow added in v0.4.1

func (_Market *MarketCallerSession) Flow() (common.Address, error)

Flow is a free data retrieval call binding the contract method 0x343aad82.

Solidity: function flow() view returns(address)

func (*MarketCallerSession) PricePerSector added in v0.4.1

func (_Market *MarketCallerSession) PricePerSector() (*big.Int, error)

PricePerSector is a free data retrieval call binding the contract method 0x61ec5082.

Solidity: function pricePerSector() view returns(uint256)

func (*MarketCallerSession) Reward added in v0.4.1

func (_Market *MarketCallerSession) Reward() (common.Address, error)

Reward is a free data retrieval call binding the contract method 0x228cb733.

Solidity: function reward() view returns(address)

type MarketFilterer added in v0.4.1

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

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

func NewMarketFilterer added in v0.4.1

func NewMarketFilterer(address common.Address, filterer bind.ContractFilterer) (*MarketFilterer, error)

NewMarketFilterer creates a new log filterer instance of Market, bound to a specific deployed contract.

type MarketRaw added in v0.4.1

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

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

func (*MarketRaw) Call added in v0.4.1

func (_Market *MarketRaw) 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 (*MarketRaw) Transact added in v0.4.1

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

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

func (*MarketRaw) Transfer added in v0.4.1

func (_Market *MarketRaw) 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 MarketSession added in v0.4.1

type MarketSession struct {
	Contract     *Market           // 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
}

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

func (*MarketSession) ChargeFee added in v0.4.1

func (_Market *MarketSession) ChargeFee(beforeLength *big.Int, uploadSectors *big.Int, paddingSectors *big.Int) (*types.Transaction, error)

ChargeFee is a paid mutator transaction binding the contract method 0xda6eb36a.

Solidity: function chargeFee(uint256 beforeLength, uint256 uploadSectors, uint256 paddingSectors) returns()

func (*MarketSession) Flow added in v0.4.1

func (_Market *MarketSession) Flow() (common.Address, error)

Flow is a free data retrieval call binding the contract method 0x343aad82.

Solidity: function flow() view returns(address)

func (*MarketSession) PricePerSector added in v0.4.1

func (_Market *MarketSession) PricePerSector() (*big.Int, error)

PricePerSector is a free data retrieval call binding the contract method 0x61ec5082.

Solidity: function pricePerSector() view returns(uint256)

func (*MarketSession) Reward added in v0.4.1

func (_Market *MarketSession) Reward() (common.Address, error)

Reward is a free data retrieval call binding the contract method 0x228cb733.

Solidity: function reward() view returns(address)

func (*MarketSession) SetPricePerSector added in v0.4.1

func (_Market *MarketSession) SetPricePerSector(pricePerSector_ *big.Int) (*types.Transaction, error)

SetPricePerSector is a paid mutator transaction binding the contract method 0x14aa90a1.

Solidity: function setPricePerSector(uint256 pricePerSector_) returns()

type MarketTransactor added in v0.4.1

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

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

func NewMarketTransactor added in v0.4.1

func NewMarketTransactor(address common.Address, transactor bind.ContractTransactor) (*MarketTransactor, error)

NewMarketTransactor creates a new write-only instance of Market, bound to a specific deployed contract.

func (*MarketTransactor) ChargeFee added in v0.4.1

func (_Market *MarketTransactor) ChargeFee(opts *bind.TransactOpts, beforeLength *big.Int, uploadSectors *big.Int, paddingSectors *big.Int) (*types.Transaction, error)

ChargeFee is a paid mutator transaction binding the contract method 0xda6eb36a.

Solidity: function chargeFee(uint256 beforeLength, uint256 uploadSectors, uint256 paddingSectors) returns()

func (*MarketTransactor) SetPricePerSector added in v0.4.1

func (_Market *MarketTransactor) SetPricePerSector(opts *bind.TransactOpts, pricePerSector_ *big.Int) (*types.Transaction, error)

SetPricePerSector is a paid mutator transaction binding the contract method 0x14aa90a1.

Solidity: function setPricePerSector(uint256 pricePerSector_) returns()

type MarketTransactorRaw added in v0.4.1

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

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

func (*MarketTransactorRaw) Transact added in v0.4.1

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

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

func (*MarketTransactorRaw) Transfer added in v0.4.1

func (_Market *MarketTransactorRaw) 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 MarketTransactorSession added in v0.4.1

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

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

func (*MarketTransactorSession) ChargeFee added in v0.4.1

func (_Market *MarketTransactorSession) ChargeFee(beforeLength *big.Int, uploadSectors *big.Int, paddingSectors *big.Int) (*types.Transaction, error)

ChargeFee is a paid mutator transaction binding the contract method 0xda6eb36a.

Solidity: function chargeFee(uint256 beforeLength, uint256 uploadSectors, uint256 paddingSectors) returns()

func (*MarketTransactorSession) SetPricePerSector added in v0.4.1

func (_Market *MarketTransactorSession) SetPricePerSector(pricePerSector_ *big.Int) (*types.Transaction, error)

SetPricePerSector is a paid mutator transaction binding the contract method 0x14aa90a1.

Solidity: function setPricePerSector(uint256 pricePerSector_) returns()

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(pricePerSector *big.Int) *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