Documentation
¶
Index ¶
- Variables
- type BN254G2Point
- type HotShotQC
- type Hotshot
- type HotshotCaller
- func (_Hotshot *HotshotCaller) BlockHeight(opts *bind.CallOpts) (*big.Int, error)
- func (_Hotshot *HotshotCaller) Commitments(opts *bind.CallOpts, blockHeight *big.Int) (*big.Int, error)
- func (_Hotshot *HotshotCaller) GetStakingKey(opts *bind.CallOpts, index *big.Int) (BN254G2Point, *big.Int, error)
- func (_Hotshot *HotshotCaller) MAXBLOCKS(opts *bind.CallOpts) (*big.Int, error)
- type HotshotCallerRaw
- type HotshotCallerSession
- func (_Hotshot *HotshotCallerSession) BlockHeight() (*big.Int, error)
- func (_Hotshot *HotshotCallerSession) Commitments(blockHeight *big.Int) (*big.Int, error)
- func (_Hotshot *HotshotCallerSession) GetStakingKey(index *big.Int) (BN254G2Point, *big.Int, error)
- func (_Hotshot *HotshotCallerSession) MAXBLOCKS() (*big.Int, error)
- type HotshotFilterer
- func (_Hotshot *HotshotFilterer) FilterNewBlocks(opts *bind.FilterOpts) (*HotshotNewBlocksIterator, error)
- func (_Hotshot *HotshotFilterer) FilterNewStakingKey(opts *bind.FilterOpts) (*HotshotNewStakingKeyIterator, error)
- func (_Hotshot *HotshotFilterer) ParseNewBlocks(log types.Log) (*HotshotNewBlocks, error)
- func (_Hotshot *HotshotFilterer) ParseNewStakingKey(log types.Log) (*HotshotNewStakingKey, error)
- func (_Hotshot *HotshotFilterer) WatchNewBlocks(opts *bind.WatchOpts, sink chan<- *HotshotNewBlocks) (event.Subscription, error)
- func (_Hotshot *HotshotFilterer) WatchNewStakingKey(opts *bind.WatchOpts, sink chan<- *HotshotNewStakingKey) (event.Subscription, error)
- type HotshotNewBlocks
- type HotshotNewBlocksIterator
- type HotshotNewStakingKey
- type HotshotNewStakingKeyIterator
- type HotshotRaw
- func (_Hotshot *HotshotRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, ...) error
- func (_Hotshot *HotshotRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
- func (_Hotshot *HotshotRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)
- type HotshotSession
- func (_Hotshot *HotshotSession) AddNewStakingKey(stakingKey BN254G2Point, amount *big.Int) (*types.Transaction, error)
- func (_Hotshot *HotshotSession) BlockHeight() (*big.Int, error)
- func (_Hotshot *HotshotSession) Commitments(blockHeight *big.Int) (*big.Int, error)
- func (_Hotshot *HotshotSession) GetStakingKey(index *big.Int) (BN254G2Point, *big.Int, error)
- func (_Hotshot *HotshotSession) MAXBLOCKS() (*big.Int, error)
- func (_Hotshot *HotshotSession) NewBlocks(qcs []HotShotQC) (*types.Transaction, error)
- type HotshotTransactor
- type HotshotTransactorRaw
- type HotshotTransactorSession
Constants ¶
This section is empty.
Variables ¶
var HotshotABI = HotshotMetaData.ABI
HotshotABI is the input ABI used to generate the binding from. Deprecated: Use HotshotMetaData.ABI instead.
var HotshotMetaData = &bind.MetaData{
ABI: "[{\"type\":\"function\",\"name\":\"MAX_BLOCKS\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"addNewStakingKey\",\"inputs\":[{\"name\":\"stakingKey\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"x0\",\"type\":\"uint256\",\"internalType\":\"BN254.BaseField\"},{\"name\":\"x1\",\"type\":\"uint256\",\"internalType\":\"BN254.BaseField\"},{\"name\":\"y0\",\"type\":\"uint256\",\"internalType\":\"BN254.BaseField\"},{\"name\":\"y1\",\"type\":\"uint256\",\"internalType\":\"BN254.BaseField\"}]},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"blockHeight\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"commitments\",\"inputs\":[{\"name\":\"blockHeight\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"commitment\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getStakingKey\",\"inputs\":[{\"name\":\"index\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"x0\",\"type\":\"uint256\",\"internalType\":\"BN254.BaseField\"},{\"name\":\"x1\",\"type\":\"uint256\",\"internalType\":\"BN254.BaseField\"},{\"name\":\"y0\",\"type\":\"uint256\",\"internalType\":\"BN254.BaseField\"},{\"name\":\"y1\",\"type\":\"uint256\",\"internalType\":\"BN254.BaseField\"}]},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"newBlocks\",\"inputs\":[{\"name\":\"qcs\",\"type\":\"tuple[]\",\"internalType\":\"structHotShot.QC[]\",\"components\":[{\"name\":\"height\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"blockCommitment\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"pad1\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"pad2\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"NewBlocks\",\"inputs\":[{\"name\":\"firstBlockNumber\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"numBlocks\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"NewStakingKey\",\"inputs\":[{\"name\":\"stakingKey\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structBN254.G2Point\",\"components\":[{\"name\":\"x0\",\"type\":\"uint256\",\"internalType\":\"BN254.BaseField\"},{\"name\":\"x1\",\"type\":\"uint256\",\"internalType\":\"BN254.BaseField\"},{\"name\":\"y0\",\"type\":\"uint256\",\"internalType\":\"BN254.BaseField\"},{\"name\":\"y1\",\"type\":\"uint256\",\"internalType\":\"BN254.BaseField\"}]},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"index\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"IncorrectBlockNumber\",\"inputs\":[{\"name\":\"blockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expectedBlockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"InvalidQC\",\"inputs\":[{\"name\":\"blockNumber\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"NoKeySelected\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotEnoughStake\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"TooManyBlocks\",\"inputs\":[{\"name\":\"numBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]",
}
HotshotMetaData contains all meta data concerning the Hotshot contract.
Functions ¶
This section is empty.
Types ¶
type BN254G2Point ¶
BN254G2Point is an auto generated low-level Go binding around an user-defined struct.
type Hotshot ¶
type Hotshot struct { HotshotCaller // Read-only binding to the contract HotshotTransactor // Write-only binding to the contract HotshotFilterer // Log filterer for contract events }
Hotshot is an auto generated Go binding around an Ethereum contract.
func NewHotshot ¶
NewHotshot creates a new instance of Hotshot, bound to a specific deployed contract.
type HotshotCaller ¶
type HotshotCaller struct {
// contains filtered or unexported fields
}
HotshotCaller is an auto generated read-only Go binding around an Ethereum contract.
func NewHotshotCaller ¶
func NewHotshotCaller(address common.Address, caller bind.ContractCaller) (*HotshotCaller, error)
NewHotshotCaller creates a new read-only instance of Hotshot, bound to a specific deployed contract.
func (*HotshotCaller) BlockHeight ¶
BlockHeight is a free data retrieval call binding the contract method 0xf44ff712.
Solidity: function blockHeight() view returns(uint256)
func (*HotshotCaller) Commitments ¶
func (_Hotshot *HotshotCaller) Commitments(opts *bind.CallOpts, blockHeight *big.Int) (*big.Int, error)
Commitments is a free data retrieval call binding the contract method 0x49ce8997.
Solidity: function commitments(uint256 blockHeight) view returns(uint256 commitment)
func (*HotshotCaller) GetStakingKey ¶
func (_Hotshot *HotshotCaller) GetStakingKey(opts *bind.CallOpts, index *big.Int) (BN254G2Point, *big.Int, error)
GetStakingKey is a free data retrieval call binding the contract method 0x67a21e70.
Solidity: function getStakingKey(uint256 index) view returns((uint256,uint256,uint256,uint256), uint256)
type HotshotCallerRaw ¶
type HotshotCallerRaw struct {
Contract *HotshotCaller // Generic read-only contract binding to access the raw methods on
}
HotshotCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
func (*HotshotCallerRaw) Call ¶
func (_Hotshot *HotshotCallerRaw) 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 HotshotCallerSession ¶
type HotshotCallerSession struct { Contract *HotshotCaller // Generic contract caller binding to set the session for CallOpts bind.CallOpts // Call options to use throughout this session }
HotshotCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.
func (*HotshotCallerSession) BlockHeight ¶
func (_Hotshot *HotshotCallerSession) BlockHeight() (*big.Int, error)
BlockHeight is a free data retrieval call binding the contract method 0xf44ff712.
Solidity: function blockHeight() view returns(uint256)
func (*HotshotCallerSession) Commitments ¶
Commitments is a free data retrieval call binding the contract method 0x49ce8997.
Solidity: function commitments(uint256 blockHeight) view returns(uint256 commitment)
func (*HotshotCallerSession) GetStakingKey ¶
func (_Hotshot *HotshotCallerSession) GetStakingKey(index *big.Int) (BN254G2Point, *big.Int, error)
GetStakingKey is a free data retrieval call binding the contract method 0x67a21e70.
Solidity: function getStakingKey(uint256 index) view returns((uint256,uint256,uint256,uint256), uint256)
type HotshotFilterer ¶
type HotshotFilterer struct {
// contains filtered or unexported fields
}
HotshotFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
func NewHotshotFilterer ¶
func NewHotshotFilterer(address common.Address, filterer bind.ContractFilterer) (*HotshotFilterer, error)
NewHotshotFilterer creates a new log filterer instance of Hotshot, bound to a specific deployed contract.
func (*HotshotFilterer) FilterNewBlocks ¶
func (_Hotshot *HotshotFilterer) FilterNewBlocks(opts *bind.FilterOpts) (*HotshotNewBlocksIterator, error)
FilterNewBlocks is a free log retrieval operation binding the contract event 0x8203a21e4f95f72e5081d5e0929b1a8c52141e123f9a14e1e74b0260fa5f52f1.
Solidity: event NewBlocks(uint256 firstBlockNumber, uint256 numBlocks)
func (*HotshotFilterer) FilterNewStakingKey ¶
func (_Hotshot *HotshotFilterer) FilterNewStakingKey(opts *bind.FilterOpts) (*HotshotNewStakingKeyIterator, error)
FilterNewStakingKey is a free log retrieval operation binding the contract event 0xd72fe1ac57d3e6d51c922ae4d811cc50aa3ad7026283aea637494a073252565a.
Solidity: event NewStakingKey((uint256,uint256,uint256,uint256) stakingKey, uint256 amount, uint256 index)
func (*HotshotFilterer) ParseNewBlocks ¶
func (_Hotshot *HotshotFilterer) ParseNewBlocks(log types.Log) (*HotshotNewBlocks, error)
ParseNewBlocks is a log parse operation binding the contract event 0x8203a21e4f95f72e5081d5e0929b1a8c52141e123f9a14e1e74b0260fa5f52f1.
Solidity: event NewBlocks(uint256 firstBlockNumber, uint256 numBlocks)
func (*HotshotFilterer) ParseNewStakingKey ¶
func (_Hotshot *HotshotFilterer) ParseNewStakingKey(log types.Log) (*HotshotNewStakingKey, error)
ParseNewStakingKey is a log parse operation binding the contract event 0xd72fe1ac57d3e6d51c922ae4d811cc50aa3ad7026283aea637494a073252565a.
Solidity: event NewStakingKey((uint256,uint256,uint256,uint256) stakingKey, uint256 amount, uint256 index)
func (*HotshotFilterer) WatchNewBlocks ¶
func (_Hotshot *HotshotFilterer) WatchNewBlocks(opts *bind.WatchOpts, sink chan<- *HotshotNewBlocks) (event.Subscription, error)
WatchNewBlocks is a free log subscription operation binding the contract event 0x8203a21e4f95f72e5081d5e0929b1a8c52141e123f9a14e1e74b0260fa5f52f1.
Solidity: event NewBlocks(uint256 firstBlockNumber, uint256 numBlocks)
func (*HotshotFilterer) WatchNewStakingKey ¶
func (_Hotshot *HotshotFilterer) WatchNewStakingKey(opts *bind.WatchOpts, sink chan<- *HotshotNewStakingKey) (event.Subscription, error)
WatchNewStakingKey is a free log subscription operation binding the contract event 0xd72fe1ac57d3e6d51c922ae4d811cc50aa3ad7026283aea637494a073252565a.
Solidity: event NewStakingKey((uint256,uint256,uint256,uint256) stakingKey, uint256 amount, uint256 index)
type HotshotNewBlocks ¶
type HotshotNewBlocks struct { FirstBlockNumber *big.Int NumBlocks *big.Int Raw types.Log // Blockchain specific contextual infos }
HotshotNewBlocks represents a NewBlocks event raised by the Hotshot contract.
type HotshotNewBlocksIterator ¶
type HotshotNewBlocksIterator struct { Event *HotshotNewBlocks // Event containing the contract specifics and raw log // contains filtered or unexported fields }
HotshotNewBlocksIterator is returned from FilterNewBlocks and is used to iterate over the raw logs and unpacked data for NewBlocks events raised by the Hotshot contract.
func (*HotshotNewBlocksIterator) Close ¶
func (it *HotshotNewBlocksIterator) Close() error
Close terminates the iteration process, releasing any pending underlying resources.
func (*HotshotNewBlocksIterator) Error ¶
func (it *HotshotNewBlocksIterator) Error() error
Error returns any retrieval or parsing error occurred during filtering.
func (*HotshotNewBlocksIterator) Next ¶
func (it *HotshotNewBlocksIterator) 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 HotshotNewStakingKey ¶
type HotshotNewStakingKey struct { StakingKey BN254G2Point Amount *big.Int Index *big.Int Raw types.Log // Blockchain specific contextual infos }
HotshotNewStakingKey represents a NewStakingKey event raised by the Hotshot contract.
type HotshotNewStakingKeyIterator ¶
type HotshotNewStakingKeyIterator struct { Event *HotshotNewStakingKey // Event containing the contract specifics and raw log // contains filtered or unexported fields }
HotshotNewStakingKeyIterator is returned from FilterNewStakingKey and is used to iterate over the raw logs and unpacked data for NewStakingKey events raised by the Hotshot contract.
func (*HotshotNewStakingKeyIterator) Close ¶
func (it *HotshotNewStakingKeyIterator) Close() error
Close terminates the iteration process, releasing any pending underlying resources.
func (*HotshotNewStakingKeyIterator) Error ¶
func (it *HotshotNewStakingKeyIterator) Error() error
Error returns any retrieval or parsing error occurred during filtering.
func (*HotshotNewStakingKeyIterator) Next ¶
func (it *HotshotNewStakingKeyIterator) 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 HotshotRaw ¶
type HotshotRaw struct {
Contract *Hotshot // Generic contract binding to access the raw methods on
}
HotshotRaw is an auto generated low-level Go binding around an Ethereum contract.
func (*HotshotRaw) Call ¶
func (_Hotshot *HotshotRaw) 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 (*HotshotRaw) Transact ¶
func (_Hotshot *HotshotRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*HotshotRaw) Transfer ¶
func (_Hotshot *HotshotRaw) 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 HotshotSession ¶
type HotshotSession struct { Contract *Hotshot // 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 }
HotshotSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.
func (*HotshotSession) AddNewStakingKey ¶
func (_Hotshot *HotshotSession) AddNewStakingKey(stakingKey BN254G2Point, amount *big.Int) (*types.Transaction, error)
AddNewStakingKey is a paid mutator transaction binding the contract method 0xf1f45d99.
Solidity: function addNewStakingKey((uint256,uint256,uint256,uint256) stakingKey, uint256 amount) returns()
func (*HotshotSession) BlockHeight ¶
func (_Hotshot *HotshotSession) BlockHeight() (*big.Int, error)
BlockHeight is a free data retrieval call binding the contract method 0xf44ff712.
Solidity: function blockHeight() view returns(uint256)
func (*HotshotSession) Commitments ¶
Commitments is a free data retrieval call binding the contract method 0x49ce8997.
Solidity: function commitments(uint256 blockHeight) view returns(uint256 commitment)
func (*HotshotSession) GetStakingKey ¶
func (_Hotshot *HotshotSession) GetStakingKey(index *big.Int) (BN254G2Point, *big.Int, error)
GetStakingKey is a free data retrieval call binding the contract method 0x67a21e70.
Solidity: function getStakingKey(uint256 index) view returns((uint256,uint256,uint256,uint256), uint256)
func (*HotshotSession) MAXBLOCKS ¶
func (_Hotshot *HotshotSession) MAXBLOCKS() (*big.Int, error)
MAXBLOCKS is a free data retrieval call binding the contract method 0x26833dcc.
Solidity: function MAX_BLOCKS() view returns(uint256)
func (*HotshotSession) NewBlocks ¶
func (_Hotshot *HotshotSession) NewBlocks(qcs []HotShotQC) (*types.Transaction, error)
NewBlocks is a paid mutator transaction binding the contract method 0x0a321cff.
Solidity: function newBlocks((uint256,uint256,uint256,uint256)[] qcs) returns()
type HotshotTransactor ¶
type HotshotTransactor struct {
// contains filtered or unexported fields
}
HotshotTransactor is an auto generated write-only Go binding around an Ethereum contract.
func NewHotshotTransactor ¶
func NewHotshotTransactor(address common.Address, transactor bind.ContractTransactor) (*HotshotTransactor, error)
NewHotshotTransactor creates a new write-only instance of Hotshot, bound to a specific deployed contract.
func (*HotshotTransactor) AddNewStakingKey ¶
func (_Hotshot *HotshotTransactor) AddNewStakingKey(opts *bind.TransactOpts, stakingKey BN254G2Point, amount *big.Int) (*types.Transaction, error)
AddNewStakingKey is a paid mutator transaction binding the contract method 0xf1f45d99.
Solidity: function addNewStakingKey((uint256,uint256,uint256,uint256) stakingKey, uint256 amount) returns()
func (*HotshotTransactor) NewBlocks ¶
func (_Hotshot *HotshotTransactor) NewBlocks(opts *bind.TransactOpts, qcs []HotShotQC) (*types.Transaction, error)
NewBlocks is a paid mutator transaction binding the contract method 0x0a321cff.
Solidity: function newBlocks((uint256,uint256,uint256,uint256)[] qcs) returns()
type HotshotTransactorRaw ¶
type HotshotTransactorRaw struct {
Contract *HotshotTransactor // Generic write-only contract binding to access the raw methods on
}
HotshotTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
func (*HotshotTransactorRaw) Transact ¶
func (_Hotshot *HotshotTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)
Transact invokes the (paid) contract method with params as input values.
func (*HotshotTransactorRaw) Transfer ¶
func (_Hotshot *HotshotTransactorRaw) 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 HotshotTransactorSession ¶
type HotshotTransactorSession struct { Contract *HotshotTransactor // Generic contract transactor binding to set the session for TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session }
HotshotTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.
func (*HotshotTransactorSession) AddNewStakingKey ¶
func (_Hotshot *HotshotTransactorSession) AddNewStakingKey(stakingKey BN254G2Point, amount *big.Int) (*types.Transaction, error)
AddNewStakingKey is a paid mutator transaction binding the contract method 0xf1f45d99.
Solidity: function addNewStakingKey((uint256,uint256,uint256,uint256) stakingKey, uint256 amount) returns()
func (*HotshotTransactorSession) NewBlocks ¶
func (_Hotshot *HotshotTransactorSession) NewBlocks(qcs []HotShotQC) (*types.Transaction, error)
NewBlocks is a paid mutator transaction binding the contract method 0x0a321cff.
Solidity: function newBlocks((uint256,uint256,uint256,uint256)[] qcs) returns()