state

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StateABI = StateMetaData.ABI

StateABI is the input ABI used to generate the binding from. Deprecated: Use StateMetaData.ABI instead.

View Source
var StateMetaData = &bind.MetaData{
	ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"blockN\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"state\",\"type\":\"uint256\"}],\"name\":\"StateUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ID_HISTORY_RETURN_LIMIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getGISTProof\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"existence\",\"type\":\"bool\"},{\"internalType\":\"uint256[64]\",\"name\":\"siblings\",\"type\":\"uint256[64]\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"auxExistence\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"auxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"auxValue\",\"type\":\"uint256\"}],\"internalType\":\"structSmt.Proof\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getGISTProofByBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"existence\",\"type\":\"bool\"},{\"internalType\":\"uint256[64]\",\"name\":\"siblings\",\"type\":\"uint256[64]\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"auxExistence\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"auxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"auxValue\",\"type\":\"uint256\"}],\"internalType\":\"structSmt.Proof\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"getGISTProofByRoot\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"existence\",\"type\":\"bool\"},{\"internalType\":\"uint256[64]\",\"name\":\"siblings\",\"type\":\"uint256[64]\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"auxExistence\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"auxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"auxValue\",\"type\":\"uint256\"}],\"internalType\":\"structSmt.Proof\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getGISTProofByTime\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"existence\",\"type\":\"bool\"},{\"internalType\":\"uint256[64]\",\"name\":\"siblings\",\"type\":\"uint256[64]\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"auxExistence\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"auxIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"auxValue\",\"type\":\"uint256\"}],\"internalType\":\"structSmt.Proof\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGISTRoot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"start\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"getGISTRootHistory\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"replacedByRoot\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAtTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"replacedAtTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAtBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"replacedAtBlock\",\"type\":\"uint256\"}],\"internalType\":\"structSmt.RootInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getGISTRootHistoryLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"getGISTRootInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"replacedByRoot\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAtTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"replacedAtTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAtBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"replacedAtBlock\",\"type\":\"uint256\"}],\"internalType\":\"structSmt.RootInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getGISTRootInfoByBlock\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"replacedByRoot\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAtTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"replacedAtTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAtBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"replacedAtBlock\",\"type\":\"uint256\"}],\"internalType\":\"structSmt.RootInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"getGISTRootInfoByTime\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"replacedByRoot\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAtTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"replacedAtTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAtBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"replacedAtBlock\",\"type\":\"uint256\"}],\"internalType\":\"structSmt.RootInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getStateInfoById\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"state\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"replacedByState\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAtTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"replacedAtTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAtBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"replacedAtBlock\",\"type\":\"uint256\"}],\"internalType\":\"structStateV2.StateInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"state\",\"type\":\"uint256\"}],\"name\":\"getStateInfoByState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"state\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"replacedByState\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAtTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"replacedAtTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAtBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"replacedAtBlock\",\"type\":\"uint256\"}],\"internalType\":\"structStateV2.StateInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"getStateInfoHistoryById\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"state\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"replacedByState\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAtTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"replacedAtTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"createdAtBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"replacedAtBlock\",\"type\":\"uint256\"}],\"internalType\":\"structStateV2.StateInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getStateInfoHistoryLengthById\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVerifier\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"idExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contractIVerifier\",\"name\":\"verifierContractAddr\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newVerifierAddr\",\"type\":\"address\"}],\"name\":\"setVerifier\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"state\",\"type\":\"uint256\"}],\"name\":\"stateExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"oldState\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newState\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isOldStateGenesis\",\"type\":\"bool\"},{\"internalType\":\"uint256[2]\",\"name\":\"a\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2][2]\",\"name\":\"b\",\"type\":\"uint256[2][2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"c\",\"type\":\"uint256[2]\"}],\"name\":\"transitState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
}

StateMetaData contains all meta data concerning the State contract.

Functions

func CheckGenesisStateID

func CheckGenesisStateID(id, state *big.Int) (bool, error)

CheckGenesisStateID check if the state is genesis for the id.

Types

type ETHResolver

type ETHResolver struct {
	RPCUrl          string
	ContractAddress common.Address
}

ETHResolver resolver for eth blockchains

func NewETHResolver

func NewETHResolver(url, contract string) *ETHResolver

NewETHResolver create ETH resolver for state.

func (ETHResolver) Resolve

func (r ETHResolver) Resolve(ctx context.Context, id, state *big.Int) (*ResolvedState, error)

Resolve returns Resolved state from blockchain

func (ETHResolver) ResolveGlobalRoot

func (r ETHResolver) ResolveGlobalRoot(ctx context.Context, state *big.Int) (*ResolvedState, error)

ResolveGlobalRoot returns Resolved global state from blockchain

type ExtendedVerificationsOptions

type ExtendedVerificationsOptions struct {
	VerificationOptions
	OnlyLatestStates             bool
	AcceptedStateTransitionDelay time.Duration
}

ExtendedVerificationsOptions allows to set additional options

type GISTGetter

type GISTGetter interface {
	GetGISTRootInfo(opts *bind.CallOpts, state *big.Int) (SmtRootInfo, error)
}

GISTGetter return global state info by state

type ResolvedState

type ResolvedState struct {
	State               string `json:"state"`
	Latest              bool   `json:"latest"`
	Genesis             bool   `json:"genesis"`
	TransitionTimestamp int64  `json:"transition_timestamp"`
}

ResolvedState can be the state verification result

func Resolve

func Resolve(ctx context.Context, getter StateGetter, id, state *big.Int) (*ResolvedState, error)

Resolve is used to resolve identity state.

func ResolveGlobalRoot

func ResolveGlobalRoot(ctx context.Context, getter GISTGetter, state *big.Int) (*ResolvedState, error)

ResolveGlobalRoot is used to resolve global root.

type SmtProof

type SmtProof struct {
	Root         *big.Int
	Existence    bool
	Siblings     [64]*big.Int
	Index        *big.Int
	Value        *big.Int
	AuxExistence bool
	AuxIndex     *big.Int
	AuxValue     *big.Int
}

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

type SmtRootInfo

type SmtRootInfo struct {
	Root                *big.Int
	ReplacedByRoot      *big.Int
	CreatedAtTimestamp  *big.Int
	ReplacedAtTimestamp *big.Int
	CreatedAtBlock      *big.Int
	ReplacedAtBlock     *big.Int
}

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

type State

type State struct {
	StateCaller     // Read-only binding to the contract
	StateTransactor // Write-only binding to the contract
	StateFilterer   // Log filterer for contract events
}

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

func NewState

func NewState(address common.Address, backend bind.ContractBackend) (*State, error)

NewState creates a new instance of State, bound to a specific deployed contract.

type StateCaller

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

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

func NewStateCaller

func NewStateCaller(address common.Address, caller bind.ContractCaller) (*StateCaller, error)

NewStateCaller creates a new read-only instance of State, bound to a specific deployed contract.

func (*StateCaller) GetGISTProof

func (_State *StateCaller) GetGISTProof(opts *bind.CallOpts, id *big.Int) (SmtProof, error)

GetGISTProof is a free data retrieval call binding the contract method 0x3025bb8c.

Solidity: function getGISTProof(uint256 id) view returns((uint256,bool,uint256[64],uint256,uint256,bool,uint256,uint256))

func (*StateCaller) GetGISTProofByBlock

func (_State *StateCaller) GetGISTProofByBlock(opts *bind.CallOpts, id *big.Int, blockNumber *big.Int) (SmtProof, error)

GetGISTProofByBlock is a free data retrieval call binding the contract method 0x046ff140.

Solidity: function getGISTProofByBlock(uint256 id, uint256 blockNumber) view returns((uint256,bool,uint256[64],uint256,uint256,bool,uint256,uint256))

func (*StateCaller) GetGISTProofByRoot

func (_State *StateCaller) GetGISTProofByRoot(opts *bind.CallOpts, id *big.Int, root *big.Int) (SmtProof, error)

GetGISTProofByRoot is a free data retrieval call binding the contract method 0xe12a36c0.

Solidity: function getGISTProofByRoot(uint256 id, uint256 root) view returns((uint256,bool,uint256[64],uint256,uint256,bool,uint256,uint256))

func (*StateCaller) GetGISTProofByTime

func (_State *StateCaller) GetGISTProofByTime(opts *bind.CallOpts, id *big.Int, timestamp *big.Int) (SmtProof, error)

GetGISTProofByTime is a free data retrieval call binding the contract method 0xd51afebf.

Solidity: function getGISTProofByTime(uint256 id, uint256 timestamp) view returns((uint256,bool,uint256[64],uint256,uint256,bool,uint256,uint256))

func (*StateCaller) GetGISTRoot

func (_State *StateCaller) GetGISTRoot(opts *bind.CallOpts) (*big.Int, error)

GetGISTRoot is a free data retrieval call binding the contract method 0x2439e3a6.

Solidity: function getGISTRoot() view returns(uint256)

func (*StateCaller) GetGISTRootHistory

func (_State *StateCaller) GetGISTRootHistory(opts *bind.CallOpts, start *big.Int, length *big.Int) ([]SmtRootInfo, error)

GetGISTRootHistory is a free data retrieval call binding the contract method 0x2f7670e4.

Solidity: function getGISTRootHistory(uint256 start, uint256 length) view returns((uint256,uint256,uint256,uint256,uint256,uint256)[])

func (*StateCaller) GetGISTRootHistoryLength

func (_State *StateCaller) GetGISTRootHistoryLength(opts *bind.CallOpts) (*big.Int, error)

GetGISTRootHistoryLength is a free data retrieval call binding the contract method 0xdccbd57a.

Solidity: function getGISTRootHistoryLength() view returns(uint256)

func (*StateCaller) GetGISTRootInfo

func (_State *StateCaller) GetGISTRootInfo(opts *bind.CallOpts, root *big.Int) (SmtRootInfo, error)

GetGISTRootInfo is a free data retrieval call binding the contract method 0x7c1a66de.

Solidity: function getGISTRootInfo(uint256 root) view returns((uint256,uint256,uint256,uint256,uint256,uint256))

func (*StateCaller) GetGISTRootInfoByBlock

func (_State *StateCaller) GetGISTRootInfoByBlock(opts *bind.CallOpts, blockNumber *big.Int) (SmtRootInfo, error)

GetGISTRootInfoByBlock is a free data retrieval call binding the contract method 0x5845e530.

Solidity: function getGISTRootInfoByBlock(uint256 blockNumber) view returns((uint256,uint256,uint256,uint256,uint256,uint256))

func (*StateCaller) GetGISTRootInfoByTime

func (_State *StateCaller) GetGISTRootInfoByTime(opts *bind.CallOpts, timestamp *big.Int) (SmtRootInfo, error)

GetGISTRootInfoByTime is a free data retrieval call binding the contract method 0x0ef6e65b.

Solidity: function getGISTRootInfoByTime(uint256 timestamp) view returns((uint256,uint256,uint256,uint256,uint256,uint256))

func (*StateCaller) GetStateInfoById

func (_State *StateCaller) GetStateInfoById(opts *bind.CallOpts, id *big.Int) (StateV2StateInfo, error)

GetStateInfoById is a free data retrieval call binding the contract method 0xb4bdea55.

Solidity: function getStateInfoById(uint256 id) view returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256))

func (*StateCaller) GetStateInfoByState

func (_State *StateCaller) GetStateInfoByState(opts *bind.CallOpts, state *big.Int) (StateV2StateInfo, error)

GetStateInfoByState is a free data retrieval call binding the contract method 0x3622b0bc.

Solidity: function getStateInfoByState(uint256 state) view returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256))

func (*StateCaller) GetStateInfoHistoryById

func (_State *StateCaller) GetStateInfoHistoryById(opts *bind.CallOpts, id *big.Int, startIndex *big.Int, length *big.Int) ([]StateV2StateInfo, error)

GetStateInfoHistoryById is a free data retrieval call binding the contract method 0xe99858fe.

Solidity: function getStateInfoHistoryById(uint256 id, uint256 startIndex, uint256 length) view returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[])

func (*StateCaller) GetStateInfoHistoryLengthById

func (_State *StateCaller) GetStateInfoHistoryLengthById(opts *bind.CallOpts, id *big.Int) (*big.Int, error)

GetStateInfoHistoryLengthById is a free data retrieval call binding the contract method 0x676d5b5a.

Solidity: function getStateInfoHistoryLengthById(uint256 id) view returns(uint256)

func (*StateCaller) GetVerifier

func (_State *StateCaller) GetVerifier(opts *bind.CallOpts) (common.Address, error)

GetVerifier is a free data retrieval call binding the contract method 0x46657fe9.

Solidity: function getVerifier() view returns(address)

func (*StateCaller) IDHISTORYRETURNLIMIT

func (_State *StateCaller) IDHISTORYRETURNLIMIT(opts *bind.CallOpts) (*big.Int, error)

IDHISTORYRETURNLIMIT is a free data retrieval call binding the contract method 0xeaa6b26c.

Solidity: function ID_HISTORY_RETURN_LIMIT() view returns(uint256)

func (*StateCaller) IdExists

func (_State *StateCaller) IdExists(opts *bind.CallOpts, id *big.Int) (bool, error)

IdExists is a free data retrieval call binding the contract method 0x0b8a295a.

Solidity: function idExists(uint256 id) view returns(bool)

func (*StateCaller) Owner

func (_State *StateCaller) Owner(opts *bind.CallOpts) (common.Address, error)

Owner is a free data retrieval call binding the contract method 0x8da5cb5b.

Solidity: function owner() view returns(address)

func (*StateCaller) StateExists

func (_State *StateCaller) StateExists(opts *bind.CallOpts, state *big.Int) (bool, error)

StateExists is a free data retrieval call binding the contract method 0x08fd3b76.

Solidity: function stateExists(uint256 state) view returns(bool)

type StateCallerRaw

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

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

func (*StateCallerRaw) Call

func (_State *StateCallerRaw) 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 StateCallerSession

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

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

func (*StateCallerSession) GetGISTProof

func (_State *StateCallerSession) GetGISTProof(id *big.Int) (SmtProof, error)

GetGISTProof is a free data retrieval call binding the contract method 0x3025bb8c.

Solidity: function getGISTProof(uint256 id) view returns((uint256,bool,uint256[64],uint256,uint256,bool,uint256,uint256))

func (*StateCallerSession) GetGISTProofByBlock

func (_State *StateCallerSession) GetGISTProofByBlock(id *big.Int, blockNumber *big.Int) (SmtProof, error)

GetGISTProofByBlock is a free data retrieval call binding the contract method 0x046ff140.

Solidity: function getGISTProofByBlock(uint256 id, uint256 blockNumber) view returns((uint256,bool,uint256[64],uint256,uint256,bool,uint256,uint256))

func (*StateCallerSession) GetGISTProofByRoot

func (_State *StateCallerSession) GetGISTProofByRoot(id *big.Int, root *big.Int) (SmtProof, error)

GetGISTProofByRoot is a free data retrieval call binding the contract method 0xe12a36c0.

Solidity: function getGISTProofByRoot(uint256 id, uint256 root) view returns((uint256,bool,uint256[64],uint256,uint256,bool,uint256,uint256))

func (*StateCallerSession) GetGISTProofByTime

func (_State *StateCallerSession) GetGISTProofByTime(id *big.Int, timestamp *big.Int) (SmtProof, error)

GetGISTProofByTime is a free data retrieval call binding the contract method 0xd51afebf.

Solidity: function getGISTProofByTime(uint256 id, uint256 timestamp) view returns((uint256,bool,uint256[64],uint256,uint256,bool,uint256,uint256))

func (*StateCallerSession) GetGISTRoot

func (_State *StateCallerSession) GetGISTRoot() (*big.Int, error)

GetGISTRoot is a free data retrieval call binding the contract method 0x2439e3a6.

Solidity: function getGISTRoot() view returns(uint256)

func (*StateCallerSession) GetGISTRootHistory

func (_State *StateCallerSession) GetGISTRootHistory(start *big.Int, length *big.Int) ([]SmtRootInfo, error)

GetGISTRootHistory is a free data retrieval call binding the contract method 0x2f7670e4.

Solidity: function getGISTRootHistory(uint256 start, uint256 length) view returns((uint256,uint256,uint256,uint256,uint256,uint256)[])

func (*StateCallerSession) GetGISTRootHistoryLength

func (_State *StateCallerSession) GetGISTRootHistoryLength() (*big.Int, error)

GetGISTRootHistoryLength is a free data retrieval call binding the contract method 0xdccbd57a.

Solidity: function getGISTRootHistoryLength() view returns(uint256)

func (*StateCallerSession) GetGISTRootInfo

func (_State *StateCallerSession) GetGISTRootInfo(root *big.Int) (SmtRootInfo, error)

GetGISTRootInfo is a free data retrieval call binding the contract method 0x7c1a66de.

Solidity: function getGISTRootInfo(uint256 root) view returns((uint256,uint256,uint256,uint256,uint256,uint256))

func (*StateCallerSession) GetGISTRootInfoByBlock

func (_State *StateCallerSession) GetGISTRootInfoByBlock(blockNumber *big.Int) (SmtRootInfo, error)

GetGISTRootInfoByBlock is a free data retrieval call binding the contract method 0x5845e530.

Solidity: function getGISTRootInfoByBlock(uint256 blockNumber) view returns((uint256,uint256,uint256,uint256,uint256,uint256))

func (*StateCallerSession) GetGISTRootInfoByTime

func (_State *StateCallerSession) GetGISTRootInfoByTime(timestamp *big.Int) (SmtRootInfo, error)

GetGISTRootInfoByTime is a free data retrieval call binding the contract method 0x0ef6e65b.

Solidity: function getGISTRootInfoByTime(uint256 timestamp) view returns((uint256,uint256,uint256,uint256,uint256,uint256))

func (*StateCallerSession) GetStateInfoById

func (_State *StateCallerSession) GetStateInfoById(id *big.Int) (StateV2StateInfo, error)

GetStateInfoById is a free data retrieval call binding the contract method 0xb4bdea55.

Solidity: function getStateInfoById(uint256 id) view returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256))

func (*StateCallerSession) GetStateInfoByState

func (_State *StateCallerSession) GetStateInfoByState(state *big.Int) (StateV2StateInfo, error)

GetStateInfoByState is a free data retrieval call binding the contract method 0x3622b0bc.

Solidity: function getStateInfoByState(uint256 state) view returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256))

func (*StateCallerSession) GetStateInfoHistoryById

func (_State *StateCallerSession) GetStateInfoHistoryById(id *big.Int, startIndex *big.Int, length *big.Int) ([]StateV2StateInfo, error)

GetStateInfoHistoryById is a free data retrieval call binding the contract method 0xe99858fe.

Solidity: function getStateInfoHistoryById(uint256 id, uint256 startIndex, uint256 length) view returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[])

func (*StateCallerSession) GetStateInfoHistoryLengthById

func (_State *StateCallerSession) GetStateInfoHistoryLengthById(id *big.Int) (*big.Int, error)

GetStateInfoHistoryLengthById is a free data retrieval call binding the contract method 0x676d5b5a.

Solidity: function getStateInfoHistoryLengthById(uint256 id) view returns(uint256)

func (*StateCallerSession) GetVerifier

func (_State *StateCallerSession) GetVerifier() (common.Address, error)

GetVerifier is a free data retrieval call binding the contract method 0x46657fe9.

Solidity: function getVerifier() view returns(address)

func (*StateCallerSession) IDHISTORYRETURNLIMIT

func (_State *StateCallerSession) IDHISTORYRETURNLIMIT() (*big.Int, error)

IDHISTORYRETURNLIMIT is a free data retrieval call binding the contract method 0xeaa6b26c.

Solidity: function ID_HISTORY_RETURN_LIMIT() view returns(uint256)

func (*StateCallerSession) IdExists

func (_State *StateCallerSession) IdExists(id *big.Int) (bool, error)

IdExists is a free data retrieval call binding the contract method 0x0b8a295a.

Solidity: function idExists(uint256 id) view returns(bool)

func (*StateCallerSession) Owner

func (_State *StateCallerSession) Owner() (common.Address, error)

Owner is a free data retrieval call binding the contract method 0x8da5cb5b.

Solidity: function owner() view returns(address)

func (*StateCallerSession) StateExists

func (_State *StateCallerSession) StateExists(state *big.Int) (bool, error)

StateExists is a free data retrieval call binding the contract method 0x08fd3b76.

Solidity: function stateExists(uint256 state) view returns(bool)

type StateFilterer

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

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

func NewStateFilterer

func NewStateFilterer(address common.Address, filterer bind.ContractFilterer) (*StateFilterer, error)

NewStateFilterer creates a new log filterer instance of State, bound to a specific deployed contract.

func (*StateFilterer) FilterInitialized

func (_State *StateFilterer) FilterInitialized(opts *bind.FilterOpts) (*StateInitializedIterator, error)

FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.

Solidity: event Initialized(uint8 version)

func (*StateFilterer) FilterOwnershipTransferred

func (_State *StateFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*StateOwnershipTransferredIterator, error)

FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.

Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

func (*StateFilterer) FilterStateUpdated

func (_State *StateFilterer) FilterStateUpdated(opts *bind.FilterOpts) (*StateStateUpdatedIterator, error)

FilterStateUpdated is a free log retrieval operation binding the contract event 0x88aef4d78ad30d12a12a98e96007f5b09c1610b5364b2b99960b7d07e00a8838.

Solidity: event StateUpdated(uint256 id, uint256 blockN, uint256 timestamp, uint256 state)

func (*StateFilterer) ParseInitialized

func (_State *StateFilterer) ParseInitialized(log types.Log) (*StateInitialized, error)

ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.

Solidity: event Initialized(uint8 version)

func (*StateFilterer) ParseOwnershipTransferred

func (_State *StateFilterer) ParseOwnershipTransferred(log types.Log) (*StateOwnershipTransferred, error)

ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.

Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

func (*StateFilterer) ParseStateUpdated

func (_State *StateFilterer) ParseStateUpdated(log types.Log) (*StateStateUpdated, error)

ParseStateUpdated is a log parse operation binding the contract event 0x88aef4d78ad30d12a12a98e96007f5b09c1610b5364b2b99960b7d07e00a8838.

Solidity: event StateUpdated(uint256 id, uint256 blockN, uint256 timestamp, uint256 state)

func (*StateFilterer) WatchInitialized

func (_State *StateFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *StateInitialized) (event.Subscription, error)

WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498.

Solidity: event Initialized(uint8 version)

func (*StateFilterer) WatchOwnershipTransferred

func (_State *StateFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *StateOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error)

WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0.

Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

func (*StateFilterer) WatchStateUpdated

func (_State *StateFilterer) WatchStateUpdated(opts *bind.WatchOpts, sink chan<- *StateStateUpdated) (event.Subscription, error)

WatchStateUpdated is a free log subscription operation binding the contract event 0x88aef4d78ad30d12a12a98e96007f5b09c1610b5364b2b99960b7d07e00a8838.

Solidity: event StateUpdated(uint256 id, uint256 blockN, uint256 timestamp, uint256 state)

type StateGetter

type StateGetter interface {
	GetStateInfoByState(opts *bind.CallOpts, state *big.Int) (StateV2StateInfo, error)
}

StateGetter return user's state info by user's ID

type StateInitialized

type StateInitialized struct {
	Version uint8
	Raw     types.Log // Blockchain specific contextual infos
}

StateInitialized represents a Initialized event raised by the State contract.

type StateInitializedIterator

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

StateInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the State contract.

func (*StateInitializedIterator) Close

func (it *StateInitializedIterator) Close() error

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

func (*StateInitializedIterator) Error

func (it *StateInitializedIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*StateInitializedIterator) Next

func (it *StateInitializedIterator) 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 StateOwnershipTransferred

type StateOwnershipTransferred struct {
	PreviousOwner common.Address
	NewOwner      common.Address
	Raw           types.Log // Blockchain specific contextual infos
}

StateOwnershipTransferred represents a OwnershipTransferred event raised by the State contract.

type StateOwnershipTransferredIterator

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

StateOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the State contract.

func (*StateOwnershipTransferredIterator) Close

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

func (*StateOwnershipTransferredIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*StateOwnershipTransferredIterator) Next

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

type StateRaw

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

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

func (*StateRaw) Call

func (_State *StateRaw) 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 (*StateRaw) Transact

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

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

func (*StateRaw) Transfer

func (_State *StateRaw) 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 StateSession

type StateSession struct {
	Contract     *State            // 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
}

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

func (*StateSession) GetGISTProof

func (_State *StateSession) GetGISTProof(id *big.Int) (SmtProof, error)

GetGISTProof is a free data retrieval call binding the contract method 0x3025bb8c.

Solidity: function getGISTProof(uint256 id) view returns((uint256,bool,uint256[64],uint256,uint256,bool,uint256,uint256))

func (*StateSession) GetGISTProofByBlock

func (_State *StateSession) GetGISTProofByBlock(id *big.Int, blockNumber *big.Int) (SmtProof, error)

GetGISTProofByBlock is a free data retrieval call binding the contract method 0x046ff140.

Solidity: function getGISTProofByBlock(uint256 id, uint256 blockNumber) view returns((uint256,bool,uint256[64],uint256,uint256,bool,uint256,uint256))

func (*StateSession) GetGISTProofByRoot

func (_State *StateSession) GetGISTProofByRoot(id *big.Int, root *big.Int) (SmtProof, error)

GetGISTProofByRoot is a free data retrieval call binding the contract method 0xe12a36c0.

Solidity: function getGISTProofByRoot(uint256 id, uint256 root) view returns((uint256,bool,uint256[64],uint256,uint256,bool,uint256,uint256))

func (*StateSession) GetGISTProofByTime

func (_State *StateSession) GetGISTProofByTime(id *big.Int, timestamp *big.Int) (SmtProof, error)

GetGISTProofByTime is a free data retrieval call binding the contract method 0xd51afebf.

Solidity: function getGISTProofByTime(uint256 id, uint256 timestamp) view returns((uint256,bool,uint256[64],uint256,uint256,bool,uint256,uint256))

func (*StateSession) GetGISTRoot

func (_State *StateSession) GetGISTRoot() (*big.Int, error)

GetGISTRoot is a free data retrieval call binding the contract method 0x2439e3a6.

Solidity: function getGISTRoot() view returns(uint256)

func (*StateSession) GetGISTRootHistory

func (_State *StateSession) GetGISTRootHistory(start *big.Int, length *big.Int) ([]SmtRootInfo, error)

GetGISTRootHistory is a free data retrieval call binding the contract method 0x2f7670e4.

Solidity: function getGISTRootHistory(uint256 start, uint256 length) view returns((uint256,uint256,uint256,uint256,uint256,uint256)[])

func (*StateSession) GetGISTRootHistoryLength

func (_State *StateSession) GetGISTRootHistoryLength() (*big.Int, error)

GetGISTRootHistoryLength is a free data retrieval call binding the contract method 0xdccbd57a.

Solidity: function getGISTRootHistoryLength() view returns(uint256)

func (*StateSession) GetGISTRootInfo

func (_State *StateSession) GetGISTRootInfo(root *big.Int) (SmtRootInfo, error)

GetGISTRootInfo is a free data retrieval call binding the contract method 0x7c1a66de.

Solidity: function getGISTRootInfo(uint256 root) view returns((uint256,uint256,uint256,uint256,uint256,uint256))

func (*StateSession) GetGISTRootInfoByBlock

func (_State *StateSession) GetGISTRootInfoByBlock(blockNumber *big.Int) (SmtRootInfo, error)

GetGISTRootInfoByBlock is a free data retrieval call binding the contract method 0x5845e530.

Solidity: function getGISTRootInfoByBlock(uint256 blockNumber) view returns((uint256,uint256,uint256,uint256,uint256,uint256))

func (*StateSession) GetGISTRootInfoByTime

func (_State *StateSession) GetGISTRootInfoByTime(timestamp *big.Int) (SmtRootInfo, error)

GetGISTRootInfoByTime is a free data retrieval call binding the contract method 0x0ef6e65b.

Solidity: function getGISTRootInfoByTime(uint256 timestamp) view returns((uint256,uint256,uint256,uint256,uint256,uint256))

func (*StateSession) GetStateInfoById

func (_State *StateSession) GetStateInfoById(id *big.Int) (StateV2StateInfo, error)

GetStateInfoById is a free data retrieval call binding the contract method 0xb4bdea55.

Solidity: function getStateInfoById(uint256 id) view returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256))

func (*StateSession) GetStateInfoByState

func (_State *StateSession) GetStateInfoByState(state *big.Int) (StateV2StateInfo, error)

GetStateInfoByState is a free data retrieval call binding the contract method 0x3622b0bc.

Solidity: function getStateInfoByState(uint256 state) view returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256))

func (*StateSession) GetStateInfoHistoryById

func (_State *StateSession) GetStateInfoHistoryById(id *big.Int, startIndex *big.Int, length *big.Int) ([]StateV2StateInfo, error)

GetStateInfoHistoryById is a free data retrieval call binding the contract method 0xe99858fe.

Solidity: function getStateInfoHistoryById(uint256 id, uint256 startIndex, uint256 length) view returns((uint256,uint256,uint256,uint256,uint256,uint256,uint256)[])

func (*StateSession) GetStateInfoHistoryLengthById

func (_State *StateSession) GetStateInfoHistoryLengthById(id *big.Int) (*big.Int, error)

GetStateInfoHistoryLengthById is a free data retrieval call binding the contract method 0x676d5b5a.

Solidity: function getStateInfoHistoryLengthById(uint256 id) view returns(uint256)

func (*StateSession) GetVerifier

func (_State *StateSession) GetVerifier() (common.Address, error)

GetVerifier is a free data retrieval call binding the contract method 0x46657fe9.

Solidity: function getVerifier() view returns(address)

func (*StateSession) IDHISTORYRETURNLIMIT

func (_State *StateSession) IDHISTORYRETURNLIMIT() (*big.Int, error)

IDHISTORYRETURNLIMIT is a free data retrieval call binding the contract method 0xeaa6b26c.

Solidity: function ID_HISTORY_RETURN_LIMIT() view returns(uint256)

func (*StateSession) IdExists

func (_State *StateSession) IdExists(id *big.Int) (bool, error)

IdExists is a free data retrieval call binding the contract method 0x0b8a295a.

Solidity: function idExists(uint256 id) view returns(bool)

func (*StateSession) Initialize

func (_State *StateSession) Initialize(verifierContractAddr common.Address) (*types.Transaction, error)

Initialize is a paid mutator transaction binding the contract method 0xc4d66de8.

Solidity: function initialize(address verifierContractAddr) returns()

func (*StateSession) Owner

func (_State *StateSession) Owner() (common.Address, error)

Owner is a free data retrieval call binding the contract method 0x8da5cb5b.

Solidity: function owner() view returns(address)

func (*StateSession) RenounceOwnership

func (_State *StateSession) RenounceOwnership() (*types.Transaction, error)

RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.

Solidity: function renounceOwnership() returns()

func (*StateSession) SetVerifier

func (_State *StateSession) SetVerifier(newVerifierAddr common.Address) (*types.Transaction, error)

SetVerifier is a paid mutator transaction binding the contract method 0x5437988d.

Solidity: function setVerifier(address newVerifierAddr) returns()

func (*StateSession) StateExists

func (_State *StateSession) StateExists(state *big.Int) (bool, error)

StateExists is a free data retrieval call binding the contract method 0x08fd3b76.

Solidity: function stateExists(uint256 state) view returns(bool)

func (*StateSession) TransferOwnership

func (_State *StateSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error)

TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.

Solidity: function transferOwnership(address newOwner) returns()

func (*StateSession) TransitState

func (_State *StateSession) TransitState(id *big.Int, oldState *big.Int, newState *big.Int, isOldStateGenesis bool, a [2]*big.Int, b [2][2]*big.Int, c [2]*big.Int) (*types.Transaction, error)

TransitState is a paid mutator transaction binding the contract method 0x28f88a65.

Solidity: function transitState(uint256 id, uint256 oldState, uint256 newState, bool isOldStateGenesis, uint256[2] a, uint256[2][2] b, uint256[2] c) returns()

type StateStateUpdated

type StateStateUpdated struct {
	Id        *big.Int
	BlockN    *big.Int
	Timestamp *big.Int
	State     *big.Int
	Raw       types.Log // Blockchain specific contextual infos
}

StateStateUpdated represents a StateUpdated event raised by the State contract.

type StateStateUpdatedIterator

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

StateStateUpdatedIterator is returned from FilterStateUpdated and is used to iterate over the raw logs and unpacked data for StateUpdated events raised by the State contract.

func (*StateStateUpdatedIterator) Close

func (it *StateStateUpdatedIterator) Close() error

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

func (*StateStateUpdatedIterator) Error

func (it *StateStateUpdatedIterator) Error() error

Error returns any retrieval or parsing error occurred during filtering.

func (*StateStateUpdatedIterator) Next

func (it *StateStateUpdatedIterator) 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 StateTransactor

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

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

func NewStateTransactor

func NewStateTransactor(address common.Address, transactor bind.ContractTransactor) (*StateTransactor, error)

NewStateTransactor creates a new write-only instance of State, bound to a specific deployed contract.

func (*StateTransactor) Initialize

func (_State *StateTransactor) Initialize(opts *bind.TransactOpts, verifierContractAddr common.Address) (*types.Transaction, error)

Initialize is a paid mutator transaction binding the contract method 0xc4d66de8.

Solidity: function initialize(address verifierContractAddr) returns()

func (*StateTransactor) RenounceOwnership

func (_State *StateTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error)

RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.

Solidity: function renounceOwnership() returns()

func (*StateTransactor) SetVerifier

func (_State *StateTransactor) SetVerifier(opts *bind.TransactOpts, newVerifierAddr common.Address) (*types.Transaction, error)

SetVerifier is a paid mutator transaction binding the contract method 0x5437988d.

Solidity: function setVerifier(address newVerifierAddr) returns()

func (*StateTransactor) TransferOwnership

func (_State *StateTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error)

TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.

Solidity: function transferOwnership(address newOwner) returns()

func (*StateTransactor) TransitState

func (_State *StateTransactor) TransitState(opts *bind.TransactOpts, id *big.Int, oldState *big.Int, newState *big.Int, isOldStateGenesis bool, a [2]*big.Int, b [2][2]*big.Int, c [2]*big.Int) (*types.Transaction, error)

TransitState is a paid mutator transaction binding the contract method 0x28f88a65.

Solidity: function transitState(uint256 id, uint256 oldState, uint256 newState, bool isOldStateGenesis, uint256[2] a, uint256[2][2] b, uint256[2] c) returns()

type StateTransactorRaw

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

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

func (*StateTransactorRaw) Transact

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

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

func (*StateTransactorRaw) Transfer

func (_State *StateTransactorRaw) 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 StateTransactorSession

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

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

func (*StateTransactorSession) Initialize

func (_State *StateTransactorSession) Initialize(verifierContractAddr common.Address) (*types.Transaction, error)

Initialize is a paid mutator transaction binding the contract method 0xc4d66de8.

Solidity: function initialize(address verifierContractAddr) returns()

func (*StateTransactorSession) RenounceOwnership

func (_State *StateTransactorSession) RenounceOwnership() (*types.Transaction, error)

RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6.

Solidity: function renounceOwnership() returns()

func (*StateTransactorSession) SetVerifier

func (_State *StateTransactorSession) SetVerifier(newVerifierAddr common.Address) (*types.Transaction, error)

SetVerifier is a paid mutator transaction binding the contract method 0x5437988d.

Solidity: function setVerifier(address newVerifierAddr) returns()

func (*StateTransactorSession) TransferOwnership

func (_State *StateTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error)

TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b.

Solidity: function transferOwnership(address newOwner) returns()

func (*StateTransactorSession) TransitState

func (_State *StateTransactorSession) TransitState(id *big.Int, oldState *big.Int, newState *big.Int, isOldStateGenesis bool, a [2]*big.Int, b [2][2]*big.Int, c [2]*big.Int) (*types.Transaction, error)

TransitState is a paid mutator transaction binding the contract method 0x28f88a65.

Solidity: function transitState(uint256 id, uint256 oldState, uint256 newState, bool isOldStateGenesis, uint256[2] a, uint256[2][2] b, uint256[2] c) returns()

type StateV2StateInfo

type StateV2StateInfo struct {
	Id                  *big.Int
	State               *big.Int
	ReplacedByState     *big.Int
	CreatedAtTimestamp  *big.Int
	ReplacedAtTimestamp *big.Int
	CreatedAtBlock      *big.Int
	ReplacedAtBlock     *big.Int
}

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

type VerificationOptions

type VerificationOptions struct {
	Contract string
	RPCUrl   string
}

VerificationOptions is options for state verification

Directories

Path Synopsis
Package mock_state is a generated GoMock package.
Package mock_state is a generated GoMock package.

Jump to

Keyboard shortcuts

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