2018-01-27 14:24:13 -05:00
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package contracts
import (
"math/big"
"strings"
2018-02-07 20:57:25 +01:00
ethereum "github.com/ethereum/go-ethereum"
2018-01-27 14:24:13 -05:00
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
2018-02-07 20:57:25 +01:00
"github.com/ethereum/go-ethereum/event"
2018-01-27 14:24:13 -05:00
)
2018-03-08 16:04:13 -08:00
// SMCABI is the input ABI used to generate the binding from.
2018-05-15 11:22:38 -07:00
const SMCABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"currentVote\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_shardId\",\"type\":\"uint256\"},{\"name\":\"_period\",\"type\":\"uint256\"},{\"name\":\"_index\",\"type\":\"uint256\"},{\"name\":\"_chunkRoot\",\"type\":\"bytes32\"}],\"name\":\"submitVote\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"deregisterNotary\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_shardId\",\"type\":\"uint256\"},{\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"hasVoted\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_shardId\",\"type\":\"uint256\"}],\"name\":\"getNotaryInCommittee\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"registerNotary\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"notaryRegistry\",\"outputs\":[{\"name\":\"deregisteredPeriod\",\"type\":\"uint256\"},{\"name\":\"poolIndex\",\"type\":\"uint256\"},{\"name\":\"balance\",\"type\":\"uint256\"},{\"name\":\"deposited\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_shardId\",\"type\":\"uint256\"},{\"name\":\"_period\",\"type\":\"uint256\"},{\"name\":\"_chunkRoot\",\"type\":\"bytes32\"}],\"name\":\"addHeader\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"lastSubmittedCollation\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"lastApprovedCollation\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"releaseNotary\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"notaryPool\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_shardId\",\"type\":\"uint256\"}],\"name\":\"getVoteCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"collationRecords\",\"outputs\":[{\"name\":\"chunkRoot\",\"type\":\"bytes32\"},{\"name\":\"proposer\",\"type\":\"address\"},{\"name\":\"isElected\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"notaryPoolLength\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"shardId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"chunkRoot\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"period\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"proposerAddress\",\"type\":\"address\"}],\"name\":\"HeaderAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"notary\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"poolIndex\",\"type\":\"uint256\"}],\"name\":\" Nota
2018-01-27 14:24:13 -05:00
2018-03-08 16:04:13 -08:00
// SMCBin is the compiled bytecode used for deploying new contracts.
2018-05-15 11:22:38 -07:00
const SMCBin = ` 0x608060405234801561001057600080fd5b50610ced806100206000396000f3006080604052600436106100da5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630c8da4cc81146100df5780634f33ffa01461010957806358377bd11461012c57806364390ff114610141578063673221af1461017057806368e9513e146101a45780636bdd3271146101ac57806375bd9912146101f557806383ceeabe1461021357806397d369a21461022b5780639910851d14610243578063a81f451014610258578063b2c2f2e814610270578063e9e0b68314610288578063f6f67d36146102cb575b600080fd5b3480156100eb57600080fd5b506100f76004356102e0565b60408051918252519081900360200190f35b34801561011557600080fd5b5061012a6004356024356044356064356102f2565b005b34801561013857600080fd5b5061012a610497565b34801561014d57600080fd5b5061015c6004356024356105c2565b604080519115158252519081900360200190f35b34801561017c57600080fd5b506101886004356105e5565b60408051600160a060020a039092168252519081900360200190f35b61012a61069e565b3480156101b857600080fd5b506101cd600160a060020a0360043516610861565b6040805194855260208501939093528383019190915215156060830152519081900360800190f35b34801561020157600080fd5b5061012a60043560243560443561088c565b34801561021f57600080fd5b506100f76004356109de565b34801561023757600080fd5b506100f76004356109f0565b34801561024f57600080fd5b5061012a610a02565b34801561026457600080fd5b50610188600435610b37565b34801561027c57600080fd5b506100f7600435610b5f565b34801561029457600080fd5b506102a3600435602435610b74565b60408051938452600160a060020a039092166020840152151582820152519081900360600190f35b3480156102d757600080fd5b506100f7610bbe565b60036020526000908152604090205481565b60008085101580156103045750606485105b151561030f57600080fd5b60054304841461031e57600080fd5b600085815260056020526040902054841461033857600080fd5b6087831061034557600080fd5b6000858152600460209081526040808320878452909152902054821461036a57600080fd5b600160a060020a03331660009081526001602052604090206003015460ff16151561039457600080fd5b61039e85846105c2565b156103a857600080fd5b33600160a060020a03166103bb866105e5565b600160a060020a0316146103ce57600080fd5b6103d88584610bc4565b6103e185610b5f565b9050605a8110610445576000858152600660209081526040808320879055600482528083208784529091529020600101805474ff00000000000000000000000000000000000000001916740100000000000000000000000000000000000000001790555b6040805183815260208101869052600160a060020a03331681830152905186917fc99370212b708f699fb6945a17eb34d0fc1ccd5b45d88f4d9682593a45d6e833919081900360600190a25050505050565b33600160a060020a038116600090815260016020819052604082209081015460039091015490919060ff1615156104cd57600080fd5b82600160a060020a03166000838154811015156104e657fe5b600091825260209091200154600160a060020a03161461050557600080fd5b61050d610be8565b50600160a060020a0382166000908152600160205260409020600543049081905561053782610c0b565b600080548390811061054557fe5b600091825260209182902001805473ffffffffffffffffffffffffffffffffffffffff191690556002805460001901905560408051600160a060020a0386168152918201849052818101839052517f90e5afdc8fd31453dcf6e37154fa117ddf3b0324c96c65015563df9d5e4b5a759181900360600190a1505050565b60009182526003602052604090912054600160ff9290920360020a900481161490565b60006005430481808080806105f8610be8565b600b5486111561060c57600a549450610612565b60095494505b600160a060020a03331660009081526001602081815260409283902090910154825160001960058b020180408083529382018390528185018d905293519081900360600190209096509194509250859081151561066b57fe5b06905060008181548110151561067d57fe5b600091825260209091200154600160a060020a031698975050505050505050565b33600160a060020a03811660009081526001602052604081206003015460ff16156106c857600080fd5b34683635c9adc5dea00000146106dd57600080fd5b6106e5610be8565b6106ed610c7c565b156107505750600254600080546001810182559080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56301805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038416179055610799565b610758610c83565b90508160008281548110151561076a57fe5b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a031602179055505b600280546001908101825560408051608081018252600080825260208083018781523484860190815260608501878152600160a060020a038b1685529
2018-01-27 14:24:13 -05:00
2018-03-08 16:04:13 -08:00
// DeploySMC deploys a new Ethereum contract, binding an instance of SMC to it.
func DeploySMC ( auth * bind . TransactOpts , backend bind . ContractBackend ) ( common . Address , * types . Transaction , * SMC , error ) {
parsed , err := abi . JSON ( strings . NewReader ( SMCABI ) )
2018-01-27 14:24:13 -05:00
if err != nil {
return common . Address { } , nil , nil , err
}
2018-03-08 16:04:13 -08:00
address , tx , contract , err := bind . DeployContract ( auth , parsed , common . FromHex ( SMCBin ) , backend )
2018-01-27 14:24:13 -05:00
if err != nil {
return common . Address { } , nil , nil , err
}
2018-03-08 16:04:13 -08:00
return address , tx , & SMC { SMCCaller : SMCCaller { contract : contract } , SMCTransactor : SMCTransactor { contract : contract } , SMCFilterer : SMCFilterer { contract : contract } } , nil
2018-01-27 14:24:13 -05:00
}
2018-03-08 16:04:13 -08:00
// SMC is an auto generated Go binding around an Ethereum contract.
type SMC struct {
SMCCaller // Read-only binding to the contract
SMCTransactor // Write-only binding to the contract
SMCFilterer // Log filterer for contract events
2018-01-27 14:24:13 -05:00
}
2018-03-08 16:04:13 -08:00
// SMCCaller is an auto generated read-only Go binding around an Ethereum contract.
type SMCCaller struct {
2018-01-27 14:24:13 -05:00
contract * bind . BoundContract // Generic contract wrapper for the low level calls
}
2018-03-08 16:04:13 -08:00
// SMCTransactor is an auto generated write-only Go binding around an Ethereum contract.
type SMCTransactor struct {
2018-01-27 14:24:13 -05:00
contract * bind . BoundContract // Generic contract wrapper for the low level calls
}
2018-03-08 16:04:13 -08:00
// SMCFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
type SMCFilterer struct {
2018-02-07 14:49:34 +01:00
contract * bind . BoundContract // Generic contract wrapper for the low level calls
}
2018-03-08 16:04:13 -08:00
// SMCSession is an auto generated Go binding around an Ethereum contract,
2018-01-27 14:24:13 -05:00
// with pre-set call and transact options.
2018-03-08 16:04:13 -08:00
type SMCSession struct {
Contract * SMC // Generic contract binding to set the session for
2018-01-27 14:24:13 -05:00
CallOpts bind . CallOpts // Call options to use throughout this session
TransactOpts bind . TransactOpts // Transaction auth options to use throughout this session
}
2018-03-08 16:04:13 -08:00
// SMCCallerSession is an auto generated read-only Go binding around an Ethereum contract,
2018-01-27 14:24:13 -05:00
// with pre-set call options.
2018-03-08 16:04:13 -08:00
type SMCCallerSession struct {
Contract * SMCCaller // Generic contract caller binding to set the session for
2018-01-27 14:24:13 -05:00
CallOpts bind . CallOpts // Call options to use throughout this session
}
2018-03-08 16:04:13 -08:00
// SMCTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
2018-01-27 14:24:13 -05:00
// with pre-set transact options.
2018-03-08 16:04:13 -08:00
type SMCTransactorSession struct {
Contract * SMCTransactor // Generic contract transactor binding to set the session for
2018-01-27 14:24:13 -05:00
TransactOpts bind . TransactOpts // Transaction auth options to use throughout this session
}
2018-03-08 16:04:13 -08:00
// SMCRaw is an auto generated low-level Go binding around an Ethereum contract.
type SMCRaw struct {
Contract * SMC // Generic contract binding to access the raw methods on
2018-01-27 14:24:13 -05:00
}
2018-03-08 16:04:13 -08:00
// SMCCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
type SMCCallerRaw struct {
Contract * SMCCaller // Generic read-only contract binding to access the raw methods on
2018-01-27 14:24:13 -05:00
}
2018-03-08 16:04:13 -08:00
// SMCTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
type SMCTransactorRaw struct {
Contract * SMCTransactor // Generic write-only contract binding to access the raw methods on
2018-01-27 14:24:13 -05:00
}
2018-03-08 16:04:13 -08:00
// NewSMC creates a new instance of SMC, bound to a specific deployed contract.
func NewSMC ( address common . Address , backend bind . ContractBackend ) ( * SMC , error ) {
contract , err := bindSMC ( address , backend , backend , backend )
2018-01-27 14:24:13 -05:00
if err != nil {
return nil , err
}
2018-03-08 16:04:13 -08:00
return & SMC { SMCCaller : SMCCaller { contract : contract } , SMCTransactor : SMCTransactor { contract : contract } , SMCFilterer : SMCFilterer { contract : contract } } , nil
2018-01-27 14:24:13 -05:00
}
2018-03-08 16:04:13 -08:00
// NewSMCCaller creates a new read-only instance of SMC, bound to a specific deployed contract.
func NewSMCCaller ( address common . Address , caller bind . ContractCaller ) ( * SMCCaller , error ) {
contract , err := bindSMC ( address , caller , nil , nil )
2018-01-27 14:24:13 -05:00
if err != nil {
return nil , err
}
2018-03-08 16:04:13 -08:00
return & SMCCaller { contract : contract } , nil
2018-01-27 14:24:13 -05:00
}
2018-03-08 16:04:13 -08:00
// NewSMCTransactor creates a new write-only instance of SMC, bound to a specific deployed contract.
func NewSMCTransactor ( address common . Address , transactor bind . ContractTransactor ) ( * SMCTransactor , error ) {
contract , err := bindSMC ( address , nil , transactor , nil )
2018-01-27 14:24:13 -05:00
if err != nil {
return nil , err
}
2018-03-08 16:04:13 -08:00
return & SMCTransactor { contract : contract } , nil
2018-01-27 14:24:13 -05:00
}
2018-03-08 16:04:13 -08:00
// NewSMCFilterer creates a new log filterer instance of SMC, bound to a specific deployed contract.
func NewSMCFilterer ( address common . Address , filterer bind . ContractFilterer ) ( * SMCFilterer , error ) {
contract , err := bindSMC ( address , nil , nil , filterer )
2018-02-07 14:49:34 +01:00
if err != nil {
return nil , err
}
2018-03-08 16:04:13 -08:00
return & SMCFilterer { contract : contract } , nil
2018-02-07 14:49:34 +01:00
}
2018-03-08 16:04:13 -08:00
// bindSMC binds a generic wrapper to an already deployed contract.
func bindSMC ( address common . Address , caller bind . ContractCaller , transactor bind . ContractTransactor , filterer bind . ContractFilterer ) ( * bind . BoundContract , error ) {
parsed , err := abi . JSON ( strings . NewReader ( SMCABI ) )
2018-01-27 14:24:13 -05:00
if err != nil {
return nil , err
}
2018-02-07 14:49:34 +01:00
return bind . NewBoundContract ( address , parsed , caller , transactor , filterer ) , nil
2018-01-27 14:24:13 -05:00
}
// 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.
2018-03-08 16:04:13 -08:00
func ( _SMC * SMCRaw ) Call ( opts * bind . CallOpts , result interface { } , method string , params ... interface { } ) error {
return _SMC . Contract . SMCCaller . contract . Call ( opts , result , method , params ... )
2018-01-27 14:24:13 -05:00
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
2018-03-08 16:04:13 -08:00
func ( _SMC * SMCRaw ) Transfer ( opts * bind . TransactOpts ) ( * types . Transaction , error ) {
return _SMC . Contract . SMCTransactor . contract . Transfer ( opts )
2018-01-27 14:24:13 -05:00
}
// Transact invokes the (paid) contract method with params as input values.
2018-03-08 16:04:13 -08:00
func ( _SMC * SMCRaw ) Transact ( opts * bind . TransactOpts , method string , params ... interface { } ) ( * types . Transaction , error ) {
return _SMC . Contract . SMCTransactor . contract . Transact ( opts , method , params ... )
2018-01-27 14:24:13 -05:00
}
// 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.
2018-03-08 16:04:13 -08:00
func ( _SMC * SMCCallerRaw ) Call ( opts * bind . CallOpts , result interface { } , method string , params ... interface { } ) error {
return _SMC . Contract . contract . Call ( opts , result , method , params ... )
2018-01-27 14:24:13 -05:00
}
// Transfer initiates a plain transaction to move funds to the contract, calling
// its default method if one is available.
2018-03-08 16:04:13 -08:00
func ( _SMC * SMCTransactorRaw ) Transfer ( opts * bind . TransactOpts ) ( * types . Transaction , error ) {
return _SMC . Contract . contract . Transfer ( opts )
2018-01-27 14:24:13 -05:00
}
// Transact invokes the (paid) contract method with params as input values.
2018-03-08 16:04:13 -08:00
func ( _SMC * SMCTransactorRaw ) Transact ( opts * bind . TransactOpts , method string , params ... interface { } ) ( * types . Transaction , error ) {
return _SMC . Contract . contract . Transact ( opts , method , params ... )
2018-01-27 14:24:13 -05:00
}
2018-05-01 21:33:40 -07:00
// CollationRecords is a free data retrieval call binding the contract method 0xe9e0b683.
2018-02-09 10:31:39 +01:00
//
2018-05-09 11:53:55 -07:00
// Solidity: function collationRecords( uint256, uint256) constant returns(chunkRoot bytes32, proposer address, isElected bool)
2018-05-01 21:33:40 -07:00
func ( _SMC * SMCCaller ) CollationRecords ( opts * bind . CallOpts , arg0 * big . Int , arg1 * big . Int ) ( struct {
ChunkRoot [ 32 ] byte
Proposer common . Address
IsElected bool
2018-02-09 10:31:39 +01:00
} , error ) {
ret := new ( struct {
2018-05-01 21:33:40 -07:00
ChunkRoot [ 32 ] byte
Proposer common . Address
IsElected bool
2018-02-09 10:31:39 +01:00
} )
out := ret
2018-05-01 21:33:40 -07:00
err := _SMC . contract . Call ( opts , out , "collationRecords" , arg0 , arg1 )
2018-02-09 10:31:39 +01:00
return * ret , err
}
2018-05-01 21:33:40 -07:00
// CollationRecords is a free data retrieval call binding the contract method 0xe9e0b683.
2018-02-09 10:31:39 +01:00
//
2018-05-01 21:33:40 -07:00
// Solidity: function collationRecords( uint256, uint256) constant returns(chunkRoot bytes32, proposer address, isElected bool)
func ( _SMC * SMCSession ) CollationRecords ( arg0 * big . Int , arg1 * big . Int ) ( struct {
ChunkRoot [ 32 ] byte
Proposer common . Address
IsElected bool
2018-02-09 10:31:39 +01:00
} , error ) {
2018-05-01 21:33:40 -07:00
return _SMC . Contract . CollationRecords ( & _SMC . CallOpts , arg0 , arg1 )
2018-02-09 10:31:39 +01:00
}
2018-05-01 21:33:40 -07:00
// CollationRecords is a free data retrieval call binding the contract method 0xe9e0b683.
2018-02-09 10:31:39 +01:00
//
2018-05-01 21:33:40 -07:00
// Solidity: function collationRecords( uint256, uint256) constant returns(chunkRoot bytes32, proposer address, isElected bool)
func ( _SMC * SMCCallerSession ) CollationRecords ( arg0 * big . Int , arg1 * big . Int ) ( struct {
ChunkRoot [ 32 ] byte
Proposer common . Address
IsElected bool
2018-02-09 10:31:39 +01:00
} , error ) {
2018-05-01 21:33:40 -07:00
return _SMC . Contract . CollationRecords ( & _SMC . CallOpts , arg0 , arg1 )
2018-03-08 16:04:13 -08:00
}
2018-05-01 21:33:40 -07:00
// CurrentVote is a free data retrieval call binding the contract method 0x0c8da4cc.
2018-03-08 16:04:13 -08:00
//
2018-05-01 21:33:40 -07:00
// Solidity: function currentVote( uint256) constant returns(bytes32)
func ( _SMC * SMCCaller ) CurrentVote ( opts * bind . CallOpts , arg0 * big . Int ) ( [ 32 ] byte , error ) {
2018-01-27 14:24:13 -05:00
var (
2018-04-24 08:47:08 -07:00
ret0 = new ( [ 32 ] byte )
2018-01-27 14:24:13 -05:00
)
out := ret0
2018-05-01 21:33:40 -07:00
err := _SMC . contract . Call ( opts , out , "currentVote" , arg0 )
2018-01-27 14:24:13 -05:00
return * ret0 , err
}
2018-05-01 21:33:40 -07:00
// CurrentVote is a free data retrieval call binding the contract method 0x0c8da4cc.
2018-01-27 14:24:13 -05:00
//
2018-05-01 21:33:40 -07:00
// Solidity: function currentVote( uint256) constant returns(bytes32)
func ( _SMC * SMCSession ) CurrentVote ( arg0 * big . Int ) ( [ 32 ] byte , error ) {
return _SMC . Contract . CurrentVote ( & _SMC . CallOpts , arg0 )
2018-01-27 14:24:13 -05:00
}
2018-05-01 21:33:40 -07:00
// CurrentVote is a free data retrieval call binding the contract method 0x0c8da4cc.
2018-01-27 14:24:13 -05:00
//
2018-05-01 21:33:40 -07:00
// Solidity: function currentVote( uint256) constant returns(bytes32)
func ( _SMC * SMCCallerSession ) CurrentVote ( arg0 * big . Int ) ( [ 32 ] byte , error ) {
return _SMC . Contract . CurrentVote ( & _SMC . CallOpts , arg0 )
2018-01-27 14:24:13 -05:00
}
2018-05-13 10:13:25 -07:00
// GetNotaryInCommittee is a free data retrieval call binding the contract method 0x673221af.
2018-01-27 14:24:13 -05:00
//
2018-05-13 10:13:25 -07:00
// Solidity: function getNotaryInCommittee(_shardId uint256) constant returns(address)
func ( _SMC * SMCCaller ) GetNotaryInCommittee ( opts * bind . CallOpts , _shardId * big . Int ) ( common . Address , error ) {
2018-01-27 14:24:13 -05:00
var (
2018-02-07 14:06:14 +01:00
ret0 = new ( common . Address )
2018-01-27 14:24:13 -05:00
)
out := ret0
2018-05-13 10:13:25 -07:00
err := _SMC . contract . Call ( opts , out , "getNotaryInCommittee" , _shardId )
2018-01-27 14:24:13 -05:00
return * ret0 , err
}
2018-05-13 10:13:25 -07:00
// GetNotaryInCommittee is a free data retrieval call binding the contract method 0x673221af.
2018-01-27 14:24:13 -05:00
//
2018-05-13 10:13:25 -07:00
// Solidity: function getNotaryInCommittee(_shardId uint256) constant returns(address)
func ( _SMC * SMCSession ) GetNotaryInCommittee ( _shardId * big . Int ) ( common . Address , error ) {
return _SMC . Contract . GetNotaryInCommittee ( & _SMC . CallOpts , _shardId )
2018-01-27 14:24:13 -05:00
}
2018-05-13 10:13:25 -07:00
// GetNotaryInCommittee is a free data retrieval call binding the contract method 0x673221af.
2018-01-27 14:24:13 -05:00
//
2018-05-13 10:13:25 -07:00
// Solidity: function getNotaryInCommittee(_shardId uint256) constant returns(address)
func ( _SMC * SMCCallerSession ) GetNotaryInCommittee ( _shardId * big . Int ) ( common . Address , error ) {
return _SMC . Contract . GetNotaryInCommittee ( & _SMC . CallOpts , _shardId )
2018-05-08 17:55:50 -07:00
}
// GetVoteCount is a free data retrieval call binding the contract method 0xb2c2f2e8.
//
// Solidity: function getVoteCount(_shardId uint256) constant returns(uint256)
func ( _SMC * SMCCaller ) GetVoteCount ( opts * bind . CallOpts , _shardId * big . Int ) ( * big . Int , error ) {
var (
ret0 = new ( * big . Int )
)
out := ret0
err := _SMC . contract . Call ( opts , out , "getVoteCount" , _shardId )
return * ret0 , err
}
// GetVoteCount is a free data retrieval call binding the contract method 0xb2c2f2e8.
//
// Solidity: function getVoteCount(_shardId uint256) constant returns(uint256)
func ( _SMC * SMCSession ) GetVoteCount ( _shardId * big . Int ) ( * big . Int , error ) {
return _SMC . Contract . GetVoteCount ( & _SMC . CallOpts , _shardId )
}
// GetVoteCount is a free data retrieval call binding the contract method 0xb2c2f2e8.
//
// Solidity: function getVoteCount(_shardId uint256) constant returns(uint256)
func ( _SMC * SMCCallerSession ) GetVoteCount ( _shardId * big . Int ) ( * big . Int , error ) {
return _SMC . Contract . GetVoteCount ( & _SMC . CallOpts , _shardId )
}
// HasVoted is a free data retrieval call binding the contract method 0x64390ff1.
//
// Solidity: function hasVoted(_shardId uint256, _index uint256) constant returns(bool)
func ( _SMC * SMCCaller ) HasVoted ( opts * bind . CallOpts , _shardId * big . Int , _index * big . Int ) ( bool , error ) {
var (
ret0 = new ( bool )
)
out := ret0
err := _SMC . contract . Call ( opts , out , "hasVoted" , _shardId , _index )
return * ret0 , err
}
// HasVoted is a free data retrieval call binding the contract method 0x64390ff1.
//
// Solidity: function hasVoted(_shardId uint256, _index uint256) constant returns(bool)
func ( _SMC * SMCSession ) HasVoted ( _shardId * big . Int , _index * big . Int ) ( bool , error ) {
return _SMC . Contract . HasVoted ( & _SMC . CallOpts , _shardId , _index )
}
// HasVoted is a free data retrieval call binding the contract method 0x64390ff1.
//
// Solidity: function hasVoted(_shardId uint256, _index uint256) constant returns(bool)
func ( _SMC * SMCCallerSession ) HasVoted ( _shardId * big . Int , _index * big . Int ) ( bool , error ) {
return _SMC . Contract . HasVoted ( & _SMC . CallOpts , _shardId , _index )
2018-01-27 14:24:13 -05:00
}
2018-05-01 21:33:40 -07:00
// LastApprovedCollation is a free data retrieval call binding the contract method 0x97d369a2.
//
// Solidity: function lastApprovedCollation( uint256) constant returns(uint256)
func ( _SMC * SMCCaller ) LastApprovedCollation ( opts * bind . CallOpts , arg0 * big . Int ) ( * big . Int , error ) {
var (
ret0 = new ( * big . Int )
)
out := ret0
err := _SMC . contract . Call ( opts , out , "lastApprovedCollation" , arg0 )
return * ret0 , err
}
// LastApprovedCollation is a free data retrieval call binding the contract method 0x97d369a2.
//
// Solidity: function lastApprovedCollation( uint256) constant returns(uint256)
func ( _SMC * SMCSession ) LastApprovedCollation ( arg0 * big . Int ) ( * big . Int , error ) {
return _SMC . Contract . LastApprovedCollation ( & _SMC . CallOpts , arg0 )
}
// LastApprovedCollation is a free data retrieval call binding the contract method 0x97d369a2.
//
// Solidity: function lastApprovedCollation( uint256) constant returns(uint256)
func ( _SMC * SMCCallerSession ) LastApprovedCollation ( arg0 * big . Int ) ( * big . Int , error ) {
return _SMC . Contract . LastApprovedCollation ( & _SMC . CallOpts , arg0 )
}
// LastSubmittedCollation is a free data retrieval call binding the contract method 0x83ceeabe.
//
// Solidity: function lastSubmittedCollation( uint256) constant returns(uint256)
func ( _SMC * SMCCaller ) LastSubmittedCollation ( opts * bind . CallOpts , arg0 * big . Int ) ( * big . Int , error ) {
var (
ret0 = new ( * big . Int )
)
out := ret0
err := _SMC . contract . Call ( opts , out , "lastSubmittedCollation" , arg0 )
return * ret0 , err
}
// LastSubmittedCollation is a free data retrieval call binding the contract method 0x83ceeabe.
//
// Solidity: function lastSubmittedCollation( uint256) constant returns(uint256)
func ( _SMC * SMCSession ) LastSubmittedCollation ( arg0 * big . Int ) ( * big . Int , error ) {
return _SMC . Contract . LastSubmittedCollation ( & _SMC . CallOpts , arg0 )
}
// LastSubmittedCollation is a free data retrieval call binding the contract method 0x83ceeabe.
//
// Solidity: function lastSubmittedCollation( uint256) constant returns(uint256)
func ( _SMC * SMCCallerSession ) LastSubmittedCollation ( arg0 * big . Int ) ( * big . Int , error ) {
return _SMC . Contract . LastSubmittedCollation ( & _SMC . CallOpts , arg0 )
}
2018-04-24 08:47:08 -07:00
// NotaryPool is a free data retrieval call binding the contract method 0xa81f4510.
2018-02-09 10:31:39 +01:00
//
2018-04-24 08:47:08 -07:00
// Solidity: function notaryPool( uint256) constant returns(address)
func ( _SMC * SMCCaller ) NotaryPool ( opts * bind . CallOpts , arg0 * big . Int ) ( common . Address , error ) {
2018-02-09 10:31:39 +01:00
var (
2018-04-24 08:47:08 -07:00
ret0 = new ( common . Address )
2018-02-09 10:31:39 +01:00
)
out := ret0
2018-04-24 08:47:08 -07:00
err := _SMC . contract . Call ( opts , out , "notaryPool" , arg0 )
2018-02-09 10:31:39 +01:00
return * ret0 , err
}
2018-04-24 08:47:08 -07:00
// NotaryPool is a free data retrieval call binding the contract method 0xa81f4510.
2018-02-09 10:31:39 +01:00
//
2018-04-24 08:47:08 -07:00
// Solidity: function notaryPool( uint256) constant returns(address)
func ( _SMC * SMCSession ) NotaryPool ( arg0 * big . Int ) ( common . Address , error ) {
return _SMC . Contract . NotaryPool ( & _SMC . CallOpts , arg0 )
2018-02-09 10:31:39 +01:00
}
2018-04-24 08:47:08 -07:00
// NotaryPool is a free data retrieval call binding the contract method 0xa81f4510.
2018-02-09 10:31:39 +01:00
//
2018-04-24 08:47:08 -07:00
// Solidity: function notaryPool( uint256) constant returns(address)
func ( _SMC * SMCCallerSession ) NotaryPool ( arg0 * big . Int ) ( common . Address , error ) {
return _SMC . Contract . NotaryPool ( & _SMC . CallOpts , arg0 )
2018-02-09 10:31:39 +01:00
}
2018-04-24 08:47:08 -07:00
// NotaryPoolLength is a free data retrieval call binding the contract method 0xf6f67d36.
2018-02-09 10:31:39 +01:00
//
2018-04-24 08:47:08 -07:00
// Solidity: function notaryPoolLength() constant returns(uint256)
func ( _SMC * SMCCaller ) NotaryPoolLength ( opts * bind . CallOpts ) ( * big . Int , error ) {
2018-02-09 10:31:39 +01:00
var (
ret0 = new ( * big . Int )
)
out := ret0
2018-04-24 08:47:08 -07:00
err := _SMC . contract . Call ( opts , out , "notaryPoolLength" )
2018-02-09 10:31:39 +01:00
return * ret0 , err
}
2018-04-24 08:47:08 -07:00
// NotaryPoolLength is a free data retrieval call binding the contract method 0xf6f67d36.
2018-02-09 10:31:39 +01:00
//
2018-04-24 08:47:08 -07:00
// Solidity: function notaryPoolLength() constant returns(uint256)
func ( _SMC * SMCSession ) NotaryPoolLength ( ) ( * big . Int , error ) {
return _SMC . Contract . NotaryPoolLength ( & _SMC . CallOpts )
2018-02-09 10:31:39 +01:00
}
2018-04-24 08:47:08 -07:00
// NotaryPoolLength is a free data retrieval call binding the contract method 0xf6f67d36.
2018-02-09 10:31:39 +01:00
//
2018-04-24 08:47:08 -07:00
// Solidity: function notaryPoolLength() constant returns(uint256)
func ( _SMC * SMCCallerSession ) NotaryPoolLength ( ) ( * big . Int , error ) {
return _SMC . Contract . NotaryPoolLength ( & _SMC . CallOpts )
2018-02-09 10:31:39 +01:00
}
2018-04-24 08:47:08 -07:00
// NotaryRegistry is a free data retrieval call binding the contract method 0x6bdd3271.
2018-02-09 10:31:39 +01:00
//
2018-05-15 09:05:01 -07:00
// Solidity: function notaryRegistry( address) constant returns(deregisteredPeriod uint256, poolIndex uint256, balance uint256, deposited bool)
2018-04-24 08:47:08 -07:00
func ( _SMC * SMCCaller ) NotaryRegistry ( opts * bind . CallOpts , arg0 common . Address ) ( struct {
DeregisteredPeriod * big . Int
PoolIndex * big . Int
2018-05-15 09:05:01 -07:00
Balance * big . Int
2018-04-24 08:47:08 -07:00
Deposited bool
2018-02-09 10:31:39 +01:00
} , error ) {
ret := new ( struct {
2018-04-24 08:47:08 -07:00
DeregisteredPeriod * big . Int
PoolIndex * big . Int
2018-05-15 09:05:01 -07:00
Balance * big . Int
2018-04-24 08:47:08 -07:00
Deposited bool
2018-02-09 10:31:39 +01:00
} )
out := ret
2018-04-24 08:47:08 -07:00
err := _SMC . contract . Call ( opts , out , "notaryRegistry" , arg0 )
2018-02-09 10:31:39 +01:00
return * ret , err
}
2018-04-24 08:47:08 -07:00
// NotaryRegistry is a free data retrieval call binding the contract method 0x6bdd3271.
2018-02-09 10:31:39 +01:00
//
2018-05-15 09:05:01 -07:00
// Solidity: function notaryRegistry( address) constant returns(deregisteredPeriod uint256, poolIndex uint256, balance uint256, deposited bool)
2018-04-24 08:47:08 -07:00
func ( _SMC * SMCSession ) NotaryRegistry ( arg0 common . Address ) ( struct {
DeregisteredPeriod * big . Int
PoolIndex * big . Int
2018-05-15 09:05:01 -07:00
Balance * big . Int
2018-04-24 08:47:08 -07:00
Deposited bool
2018-02-09 10:31:39 +01:00
} , error ) {
2018-04-24 08:47:08 -07:00
return _SMC . Contract . NotaryRegistry ( & _SMC . CallOpts , arg0 )
2018-02-09 10:31:39 +01:00
}
2018-04-24 08:47:08 -07:00
// NotaryRegistry is a free data retrieval call binding the contract method 0x6bdd3271.
2018-02-09 10:31:39 +01:00
//
2018-05-15 09:05:01 -07:00
// Solidity: function notaryRegistry( address) constant returns(deregisteredPeriod uint256, poolIndex uint256, balance uint256, deposited bool)
2018-04-24 08:47:08 -07:00
func ( _SMC * SMCCallerSession ) NotaryRegistry ( arg0 common . Address ) ( struct {
DeregisteredPeriod * big . Int
PoolIndex * big . Int
2018-05-15 09:05:01 -07:00
Balance * big . Int
2018-04-24 08:47:08 -07:00
Deposited bool
2018-02-09 10:31:39 +01:00
} , error ) {
2018-04-24 08:47:08 -07:00
return _SMC . Contract . NotaryRegistry ( & _SMC . CallOpts , arg0 )
2018-02-09 10:31:39 +01:00
}
2018-05-01 21:33:40 -07:00
// AddHeader is a paid mutator transaction binding the contract method 0x75bd9912.
2018-01-27 14:24:13 -05:00
//
2018-05-01 21:33:40 -07:00
// Solidity: function addHeader(_shardId uint256, _period uint256, _chunkRoot bytes32) returns()
func ( _SMC * SMCTransactor ) AddHeader ( opts * bind . TransactOpts , _shardId * big . Int , _period * big . Int , _chunkRoot [ 32 ] byte ) ( * types . Transaction , error ) {
return _SMC . contract . Transact ( opts , "addHeader" , _shardId , _period , _chunkRoot )
2018-01-27 14:24:13 -05:00
}
2018-05-01 21:33:40 -07:00
// AddHeader is a paid mutator transaction binding the contract method 0x75bd9912.
2018-01-27 14:24:13 -05:00
//
2018-05-01 21:33:40 -07:00
// Solidity: function addHeader(_shardId uint256, _period uint256, _chunkRoot bytes32) returns()
func ( _SMC * SMCSession ) AddHeader ( _shardId * big . Int , _period * big . Int , _chunkRoot [ 32 ] byte ) ( * types . Transaction , error ) {
return _SMC . Contract . AddHeader ( & _SMC . TransactOpts , _shardId , _period , _chunkRoot )
2018-01-27 14:24:13 -05:00
}
2018-05-01 21:33:40 -07:00
// AddHeader is a paid mutator transaction binding the contract method 0x75bd9912.
2018-01-27 14:24:13 -05:00
//
2018-05-01 21:33:40 -07:00
// Solidity: function addHeader(_shardId uint256, _period uint256, _chunkRoot bytes32) returns()
func ( _SMC * SMCTransactorSession ) AddHeader ( _shardId * big . Int , _period * big . Int , _chunkRoot [ 32 ] byte ) ( * types . Transaction , error ) {
return _SMC . Contract . AddHeader ( & _SMC . TransactOpts , _shardId , _period , _chunkRoot )
2018-01-27 14:24:13 -05:00
}
2018-04-24 08:47:08 -07:00
// DeregisterNotary is a paid mutator transaction binding the contract method 0x58377bd1.
2018-01-27 14:24:13 -05:00
//
2018-04-27 16:38:24 -07:00
// Solidity: function deregisterNotary() returns()
2018-04-24 08:47:08 -07:00
func ( _SMC * SMCTransactor ) DeregisterNotary ( opts * bind . TransactOpts ) ( * types . Transaction , error ) {
return _SMC . contract . Transact ( opts , "deregisterNotary" )
2018-01-27 14:24:13 -05:00
}
2018-04-24 08:47:08 -07:00
// DeregisterNotary is a paid mutator transaction binding the contract method 0x58377bd1.
2018-01-27 14:24:13 -05:00
//
2018-04-27 16:38:24 -07:00
// Solidity: function deregisterNotary() returns()
2018-04-24 08:47:08 -07:00
func ( _SMC * SMCSession ) DeregisterNotary ( ) ( * types . Transaction , error ) {
return _SMC . Contract . DeregisterNotary ( & _SMC . TransactOpts )
2018-01-27 14:24:13 -05:00
}
2018-04-24 08:47:08 -07:00
// DeregisterNotary is a paid mutator transaction binding the contract method 0x58377bd1.
2018-01-27 14:24:13 -05:00
//
2018-04-27 16:38:24 -07:00
// Solidity: function deregisterNotary() returns()
2018-04-24 08:47:08 -07:00
func ( _SMC * SMCTransactorSession ) DeregisterNotary ( ) ( * types . Transaction , error ) {
return _SMC . Contract . DeregisterNotary ( & _SMC . TransactOpts )
2018-01-27 14:24:13 -05:00
}
2018-04-24 08:47:08 -07:00
// RegisterNotary is a paid mutator transaction binding the contract method 0x68e9513e.
2018-01-27 14:24:13 -05:00
//
2018-04-27 16:38:24 -07:00
// Solidity: function registerNotary() returns()
2018-04-24 08:47:08 -07:00
func ( _SMC * SMCTransactor ) RegisterNotary ( opts * bind . TransactOpts ) ( * types . Transaction , error ) {
return _SMC . contract . Transact ( opts , "registerNotary" )
2018-01-27 14:24:13 -05:00
}
2018-04-24 08:47:08 -07:00
// RegisterNotary is a paid mutator transaction binding the contract method 0x68e9513e.
2018-01-27 14:24:13 -05:00
//
2018-04-27 16:38:24 -07:00
// Solidity: function registerNotary() returns()
2018-04-24 08:47:08 -07:00
func ( _SMC * SMCSession ) RegisterNotary ( ) ( * types . Transaction , error ) {
return _SMC . Contract . RegisterNotary ( & _SMC . TransactOpts )
2018-01-27 14:24:13 -05:00
}
2018-04-24 08:47:08 -07:00
// RegisterNotary is a paid mutator transaction binding the contract method 0x68e9513e.
2018-01-27 14:24:13 -05:00
//
2018-04-27 16:38:24 -07:00
// Solidity: function registerNotary() returns()
2018-04-24 08:47:08 -07:00
func ( _SMC * SMCTransactorSession ) RegisterNotary ( ) ( * types . Transaction , error ) {
return _SMC . Contract . RegisterNotary ( & _SMC . TransactOpts )
2018-01-27 14:24:13 -05:00
}
2018-04-24 08:47:08 -07:00
// ReleaseNotary is a paid mutator transaction binding the contract method 0x9910851d.
2018-01-27 14:24:13 -05:00
//
2018-04-27 16:38:24 -07:00
// Solidity: function releaseNotary() returns()
2018-04-24 08:47:08 -07:00
func ( _SMC * SMCTransactor ) ReleaseNotary ( opts * bind . TransactOpts ) ( * types . Transaction , error ) {
return _SMC . contract . Transact ( opts , "releaseNotary" )
2018-01-27 14:24:13 -05:00
}
2018-04-24 08:47:08 -07:00
// ReleaseNotary is a paid mutator transaction binding the contract method 0x9910851d.
2018-01-27 14:24:13 -05:00
//
2018-04-27 16:38:24 -07:00
// Solidity: function releaseNotary() returns()
2018-04-24 08:47:08 -07:00
func ( _SMC * SMCSession ) ReleaseNotary ( ) ( * types . Transaction , error ) {
return _SMC . Contract . ReleaseNotary ( & _SMC . TransactOpts )
2018-01-27 14:24:13 -05:00
}
2018-04-24 08:47:08 -07:00
// ReleaseNotary is a paid mutator transaction binding the contract method 0x9910851d.
2018-01-27 14:24:13 -05:00
//
2018-04-27 16:38:24 -07:00
// Solidity: function releaseNotary() returns()
2018-04-24 08:47:08 -07:00
func ( _SMC * SMCTransactorSession ) ReleaseNotary ( ) ( * types . Transaction , error ) {
return _SMC . Contract . ReleaseNotary ( & _SMC . TransactOpts )
2018-01-27 14:24:13 -05:00
}
2018-02-07 20:57:25 +01:00
2018-05-01 21:33:40 -07:00
// SubmitVote is a paid mutator transaction binding the contract method 0x4f33ffa0.
//
// Solidity: function submitVote(_shardId uint256, _period uint256, _index uint256, _chunkRoot bytes32) returns()
func ( _SMC * SMCTransactor ) SubmitVote ( opts * bind . TransactOpts , _shardId * big . Int , _period * big . Int , _index * big . Int , _chunkRoot [ 32 ] byte ) ( * types . Transaction , error ) {
return _SMC . contract . Transact ( opts , "submitVote" , _shardId , _period , _index , _chunkRoot )
}
// SubmitVote is a paid mutator transaction binding the contract method 0x4f33ffa0.
//
// Solidity: function submitVote(_shardId uint256, _period uint256, _index uint256, _chunkRoot bytes32) returns()
func ( _SMC * SMCSession ) SubmitVote ( _shardId * big . Int , _period * big . Int , _index * big . Int , _chunkRoot [ 32 ] byte ) ( * types . Transaction , error ) {
return _SMC . Contract . SubmitVote ( & _SMC . TransactOpts , _shardId , _period , _index , _chunkRoot )
}
// SubmitVote is a paid mutator transaction binding the contract method 0x4f33ffa0.
//
// Solidity: function submitVote(_shardId uint256, _period uint256, _index uint256, _chunkRoot bytes32) returns()
func ( _SMC * SMCTransactorSession ) SubmitVote ( _shardId * big . Int , _period * big . Int , _index * big . Int , _chunkRoot [ 32 ] byte ) ( * types . Transaction , error ) {
return _SMC . Contract . SubmitVote ( & _SMC . TransactOpts , _shardId , _period , _index , _chunkRoot )
}
2018-04-24 08:47:08 -07:00
// SMCHeaderAddedIterator is returned from FilterHeaderAdded and is used to iterate over the raw logs and unpacked data for HeaderAdded events raised by the SMC contract.
type SMCHeaderAddedIterator struct {
Event * SMCHeaderAdded // Event containing the contract specifics and raw log
2018-02-07 20:57:25 +01:00
contract * bind . BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types . Log // Log channel receiving the found contract events
sub ethereum . Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// 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.
2018-04-24 08:47:08 -07:00
func ( it * SMCHeaderAddedIterator ) Next ( ) bool {
2018-02-07 20:57:25 +01:00
// If the iterator failed, stop iterating
if it . fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it . done {
select {
case log := <- it . logs :
2018-04-24 08:47:08 -07:00
it . Event = new ( SMCHeaderAdded )
2018-02-07 20:57:25 +01:00
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
default :
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <- it . logs :
2018-04-24 08:47:08 -07:00
it . Event = new ( SMCHeaderAdded )
2018-02-07 20:57:25 +01:00
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
case err := <- it . sub . Err ( ) :
it . done = true
it . fail = err
return it . Next ( )
}
}
// Error returns any retrieval or parsing error occurred during filtering.
2018-04-24 08:47:08 -07:00
func ( it * SMCHeaderAddedIterator ) Error ( ) error {
2018-02-07 20:57:25 +01:00
return it . fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
2018-04-24 08:47:08 -07:00
func ( it * SMCHeaderAddedIterator ) Close ( ) error {
2018-02-07 20:57:25 +01:00
it . sub . Unsubscribe ( )
return nil
}
2018-04-24 08:47:08 -07:00
// SMCHeaderAdded represents a HeaderAdded event raised by the SMC contract.
type SMCHeaderAdded struct {
ShardId * big . Int
ChunkRoot [ 32 ] byte
Period * big . Int
ProposerAddress common . Address
Raw types . Log // Blockchain specific contextual infos
2018-02-07 20:57:25 +01:00
}
2018-05-01 21:33:40 -07:00
// FilterHeaderAdded is a free log retrieval operation binding the contract event 0x2d0a86178d2fd307b47be157a766e6bee19bc26161c32f9781ee0e818636f09c.
2018-02-07 20:57:25 +01:00
//
2018-05-01 21:33:40 -07:00
// Solidity: event HeaderAdded(shardId indexed uint256, chunkRoot bytes32, period uint256, proposerAddress address)
2018-04-24 08:47:08 -07:00
func ( _SMC * SMCFilterer ) FilterHeaderAdded ( opts * bind . FilterOpts , shardId [ ] * big . Int ) ( * SMCHeaderAddedIterator , error ) {
2018-02-07 20:57:25 +01:00
var shardIdRule [ ] interface { }
for _ , shardIdItem := range shardId {
shardIdRule = append ( shardIdRule , shardIdItem )
}
2018-04-24 08:47:08 -07:00
logs , sub , err := _SMC . contract . FilterLogs ( opts , "HeaderAdded" , shardIdRule )
2018-02-07 20:57:25 +01:00
if err != nil {
return nil , err
}
2018-04-24 08:47:08 -07:00
return & SMCHeaderAddedIterator { contract : _SMC . contract , event : "HeaderAdded" , logs : logs , sub : sub } , nil
2018-02-07 20:57:25 +01:00
}
2018-05-01 21:33:40 -07:00
// WatchHeaderAdded is a free log subscription operation binding the contract event 0x2d0a86178d2fd307b47be157a766e6bee19bc26161c32f9781ee0e818636f09c.
2018-02-07 20:57:25 +01:00
//
2018-05-01 21:33:40 -07:00
// Solidity: event HeaderAdded(shardId indexed uint256, chunkRoot bytes32, period uint256, proposerAddress address)
2018-04-24 08:47:08 -07:00
func ( _SMC * SMCFilterer ) WatchHeaderAdded ( opts * bind . WatchOpts , sink chan <- * SMCHeaderAdded , shardId [ ] * big . Int ) ( event . Subscription , error ) {
2018-02-07 20:57:25 +01:00
var shardIdRule [ ] interface { }
for _ , shardIdItem := range shardId {
shardIdRule = append ( shardIdRule , shardIdItem )
}
2018-04-24 08:47:08 -07:00
logs , sub , err := _SMC . contract . WatchLogs ( opts , "HeaderAdded" , shardIdRule )
2018-02-07 20:57:25 +01:00
if err != nil {
return nil , err
}
return event . NewSubscription ( func ( quit <- chan struct { } ) error {
defer sub . Unsubscribe ( )
for {
select {
case log := <- logs :
// New log arrived, parse the event and forward to the user
2018-04-24 08:47:08 -07:00
event := new ( SMCHeaderAdded )
if err := _SMC . contract . UnpackLog ( event , "HeaderAdded" , log ) ; err != nil {
2018-02-07 20:57:25 +01:00
return err
}
event . Raw = log
select {
case sink <- event :
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
}
} ) , nil
}
2018-04-24 08:47:08 -07:00
// SMCNotaryDeregisteredIterator is returned from FilterNotaryDeregistered and is used to iterate over the raw logs and unpacked data for NotaryDeregistered events raised by the SMC contract.
type SMCNotaryDeregisteredIterator struct {
Event * SMCNotaryDeregistered // Event containing the contract specifics and raw log
2018-02-07 20:57:25 +01:00
contract * bind . BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types . Log // Log channel receiving the found contract events
sub ethereum . Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// 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.
2018-04-24 08:47:08 -07:00
func ( it * SMCNotaryDeregisteredIterator ) Next ( ) bool {
2018-02-07 20:57:25 +01:00
// If the iterator failed, stop iterating
if it . fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it . done {
select {
case log := <- it . logs :
2018-04-24 08:47:08 -07:00
it . Event = new ( SMCNotaryDeregistered )
2018-02-07 20:57:25 +01:00
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
default :
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <- it . logs :
2018-04-24 08:47:08 -07:00
it . Event = new ( SMCNotaryDeregistered )
2018-02-07 20:57:25 +01:00
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
case err := <- it . sub . Err ( ) :
it . done = true
it . fail = err
return it . Next ( )
}
}
// Error returns any retrieval or parsing error occurred during filtering.
2018-04-24 08:47:08 -07:00
func ( it * SMCNotaryDeregisteredIterator ) Error ( ) error {
2018-02-07 20:57:25 +01:00
return it . fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
2018-04-24 08:47:08 -07:00
func ( it * SMCNotaryDeregisteredIterator ) Close ( ) error {
2018-02-07 20:57:25 +01:00
it . sub . Unsubscribe ( )
return nil
}
2018-04-24 08:47:08 -07:00
// SMCNotaryDeregistered represents a NotaryDeregistered event raised by the SMC contract.
type SMCNotaryDeregistered struct {
Notary common . Address
PoolIndex * big . Int
DeregisteredPeriod * big . Int
Raw types . Log // Blockchain specific contextual infos
2018-02-07 20:57:25 +01:00
}
2018-04-24 08:47:08 -07:00
// FilterNotaryDeregistered is a free log retrieval operation binding the contract event 0x90e5afdc8fd31453dcf6e37154fa117ddf3b0324c96c65015563df9d5e4b5a75.
2018-02-07 20:57:25 +01:00
//
2018-04-24 08:47:08 -07:00
// Solidity: event NotaryDeregistered(notary address, poolIndex uint256, deregisteredPeriod uint256)
func ( _SMC * SMCFilterer ) FilterNotaryDeregistered ( opts * bind . FilterOpts ) ( * SMCNotaryDeregisteredIterator , error ) {
2018-02-07 20:57:25 +01:00
2018-04-24 08:47:08 -07:00
logs , sub , err := _SMC . contract . FilterLogs ( opts , "NotaryDeregistered" )
2018-02-07 20:57:25 +01:00
if err != nil {
return nil , err
}
2018-04-24 08:47:08 -07:00
return & SMCNotaryDeregisteredIterator { contract : _SMC . contract , event : "NotaryDeregistered" , logs : logs , sub : sub } , nil
2018-02-07 20:57:25 +01:00
}
2018-04-24 08:47:08 -07:00
// WatchNotaryDeregistered is a free log subscription operation binding the contract event 0x90e5afdc8fd31453dcf6e37154fa117ddf3b0324c96c65015563df9d5e4b5a75.
2018-02-07 20:57:25 +01:00
//
2018-04-24 08:47:08 -07:00
// Solidity: event NotaryDeregistered(notary address, poolIndex uint256, deregisteredPeriod uint256)
func ( _SMC * SMCFilterer ) WatchNotaryDeregistered ( opts * bind . WatchOpts , sink chan <- * SMCNotaryDeregistered ) ( event . Subscription , error ) {
2018-02-07 20:57:25 +01:00
2018-04-24 08:47:08 -07:00
logs , sub , err := _SMC . contract . WatchLogs ( opts , "NotaryDeregistered" )
2018-02-07 20:57:25 +01:00
if err != nil {
return nil , err
}
return event . NewSubscription ( func ( quit <- chan struct { } ) error {
defer sub . Unsubscribe ( )
for {
select {
case log := <- logs :
// New log arrived, parse the event and forward to the user
2018-04-24 08:47:08 -07:00
event := new ( SMCNotaryDeregistered )
if err := _SMC . contract . UnpackLog ( event , "NotaryDeregistered" , log ) ; err != nil {
2018-02-07 20:57:25 +01:00
return err
}
event . Raw = log
select {
case sink <- event :
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
}
} ) , nil
}
2018-04-24 08:47:08 -07:00
// SMCNotaryRegisteredIterator is returned from FilterNotaryRegistered and is used to iterate over the raw logs and unpacked data for NotaryRegistered events raised by the SMC contract.
type SMCNotaryRegisteredIterator struct {
Event * SMCNotaryRegistered // Event containing the contract specifics and raw log
2018-02-07 20:57:25 +01:00
contract * bind . BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types . Log // Log channel receiving the found contract events
sub ethereum . Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// 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.
2018-04-24 08:47:08 -07:00
func ( it * SMCNotaryRegisteredIterator ) Next ( ) bool {
2018-02-07 20:57:25 +01:00
// If the iterator failed, stop iterating
if it . fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it . done {
select {
case log := <- it . logs :
2018-04-24 08:47:08 -07:00
it . Event = new ( SMCNotaryRegistered )
2018-02-07 20:57:25 +01:00
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
default :
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <- it . logs :
2018-04-24 08:47:08 -07:00
it . Event = new ( SMCNotaryRegistered )
2018-02-07 20:57:25 +01:00
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
case err := <- it . sub . Err ( ) :
it . done = true
it . fail = err
return it . Next ( )
}
}
// Error returns any retrieval or parsing error occurred during filtering.
2018-04-24 08:47:08 -07:00
func ( it * SMCNotaryRegisteredIterator ) Error ( ) error {
2018-02-07 20:57:25 +01:00
return it . fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
2018-04-24 08:47:08 -07:00
func ( it * SMCNotaryRegisteredIterator ) Close ( ) error {
2018-02-07 20:57:25 +01:00
it . sub . Unsubscribe ( )
return nil
}
2018-04-24 08:47:08 -07:00
// SMCNotaryRegistered represents a NotaryRegistered event raised by the SMC contract.
type SMCNotaryRegistered struct {
Notary common . Address
PoolIndex * big . Int
2018-02-07 20:57:25 +01:00
Raw types . Log // Blockchain specific contextual infos
}
2018-04-24 08:47:08 -07:00
// FilterNotaryRegistered is a free log retrieval operation binding the contract event 0xa4fe15c53db34d35a5117acc26c27a2653dc68e2dadfc21ed211e38b7864d7a7.
2018-02-07 20:57:25 +01:00
//
2018-04-24 08:47:08 -07:00
// Solidity: event NotaryRegistered(notary address, poolIndex uint256)
func ( _SMC * SMCFilterer ) FilterNotaryRegistered ( opts * bind . FilterOpts ) ( * SMCNotaryRegisteredIterator , error ) {
2018-02-07 20:57:25 +01:00
2018-04-24 08:47:08 -07:00
logs , sub , err := _SMC . contract . FilterLogs ( opts , "NotaryRegistered" )
2018-02-07 20:57:25 +01:00
if err != nil {
return nil , err
}
2018-04-24 08:47:08 -07:00
return & SMCNotaryRegisteredIterator { contract : _SMC . contract , event : "NotaryRegistered" , logs : logs , sub : sub } , nil
2018-02-07 20:57:25 +01:00
}
2018-04-24 08:47:08 -07:00
// WatchNotaryRegistered is a free log subscription operation binding the contract event 0xa4fe15c53db34d35a5117acc26c27a2653dc68e2dadfc21ed211e38b7864d7a7.
2018-02-07 20:57:25 +01:00
//
2018-04-24 08:47:08 -07:00
// Solidity: event NotaryRegistered(notary address, poolIndex uint256)
func ( _SMC * SMCFilterer ) WatchNotaryRegistered ( opts * bind . WatchOpts , sink chan <- * SMCNotaryRegistered ) ( event . Subscription , error ) {
2018-02-07 20:57:25 +01:00
2018-04-24 08:47:08 -07:00
logs , sub , err := _SMC . contract . WatchLogs ( opts , "NotaryRegistered" )
2018-02-07 20:57:25 +01:00
if err != nil {
return nil , err
}
return event . NewSubscription ( func ( quit <- chan struct { } ) error {
defer sub . Unsubscribe ( )
for {
select {
case log := <- logs :
// New log arrived, parse the event and forward to the user
2018-04-24 08:47:08 -07:00
event := new ( SMCNotaryRegistered )
if err := _SMC . contract . UnpackLog ( event , "NotaryRegistered" , log ) ; err != nil {
2018-02-07 20:57:25 +01:00
return err
}
event . Raw = log
select {
case sink <- event :
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
}
} ) , nil
}
2018-04-24 08:47:08 -07:00
// SMCNotaryReleasedIterator is returned from FilterNotaryReleased and is used to iterate over the raw logs and unpacked data for NotaryReleased events raised by the SMC contract.
type SMCNotaryReleasedIterator struct {
Event * SMCNotaryReleased // Event containing the contract specifics and raw log
2018-02-07 20:57:25 +01:00
contract * bind . BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types . Log // Log channel receiving the found contract events
sub ethereum . Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// 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.
2018-04-24 08:47:08 -07:00
func ( it * SMCNotaryReleasedIterator ) Next ( ) bool {
2018-02-07 20:57:25 +01:00
// If the iterator failed, stop iterating
if it . fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it . done {
select {
case log := <- it . logs :
2018-04-24 08:47:08 -07:00
it . Event = new ( SMCNotaryReleased )
2018-02-07 20:57:25 +01:00
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
default :
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <- it . logs :
2018-04-24 08:47:08 -07:00
it . Event = new ( SMCNotaryReleased )
2018-02-07 20:57:25 +01:00
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
case err := <- it . sub . Err ( ) :
it . done = true
it . fail = err
return it . Next ( )
}
}
// Error returns any retrieval or parsing error occurred during filtering.
2018-04-24 08:47:08 -07:00
func ( it * SMCNotaryReleasedIterator ) Error ( ) error {
2018-02-07 20:57:25 +01:00
return it . fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
2018-04-24 08:47:08 -07:00
func ( it * SMCNotaryReleasedIterator ) Close ( ) error {
2018-02-07 20:57:25 +01:00
it . sub . Unsubscribe ( )
return nil
}
2018-04-24 08:47:08 -07:00
// SMCNotaryReleased represents a NotaryReleased event raised by the SMC contract.
type SMCNotaryReleased struct {
Notary common . Address
PoolIndex * big . Int
Raw types . Log // Blockchain specific contextual infos
2018-02-07 20:57:25 +01:00
}
2018-04-24 08:47:08 -07:00
// FilterNotaryReleased is a free log retrieval operation binding the contract event 0xaee20171b64b7f3360a142659094ce929970d6963dcea8c34a9bf1ece8033680.
2018-02-07 20:57:25 +01:00
//
2018-04-24 08:47:08 -07:00
// Solidity: event NotaryReleased(notary address, poolIndex uint256)
func ( _SMC * SMCFilterer ) FilterNotaryReleased ( opts * bind . FilterOpts ) ( * SMCNotaryReleasedIterator , error ) {
2018-02-07 20:57:25 +01:00
2018-04-24 08:47:08 -07:00
logs , sub , err := _SMC . contract . FilterLogs ( opts , "NotaryReleased" )
2018-02-07 20:57:25 +01:00
if err != nil {
return nil , err
}
2018-04-24 08:47:08 -07:00
return & SMCNotaryReleasedIterator { contract : _SMC . contract , event : "NotaryReleased" , logs : logs , sub : sub } , nil
2018-02-07 20:57:25 +01:00
}
2018-04-24 08:47:08 -07:00
// WatchNotaryReleased is a free log subscription operation binding the contract event 0xaee20171b64b7f3360a142659094ce929970d6963dcea8c34a9bf1ece8033680.
2018-02-07 20:57:25 +01:00
//
2018-04-24 08:47:08 -07:00
// Solidity: event NotaryReleased(notary address, poolIndex uint256)
func ( _SMC * SMCFilterer ) WatchNotaryReleased ( opts * bind . WatchOpts , sink chan <- * SMCNotaryReleased ) ( event . Subscription , error ) {
2018-02-07 20:57:25 +01:00
2018-04-24 08:47:08 -07:00
logs , sub , err := _SMC . contract . WatchLogs ( opts , "NotaryReleased" )
2018-02-07 20:57:25 +01:00
if err != nil {
return nil , err
}
return event . NewSubscription ( func ( quit <- chan struct { } ) error {
defer sub . Unsubscribe ( )
for {
select {
case log := <- logs :
// New log arrived, parse the event and forward to the user
2018-04-24 08:47:08 -07:00
event := new ( SMCNotaryReleased )
if err := _SMC . contract . UnpackLog ( event , "NotaryReleased" , log ) ; err != nil {
2018-02-07 20:57:25 +01:00
return err
}
event . Raw = log
select {
case sink <- event :
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
}
} ) , nil
}
2018-05-01 21:33:40 -07:00
2018-05-08 14:55:18 -07:00
// SMCVoteSubmittedIterator is returned from FilterVoteSubmitted and is used to iterate over the raw logs and unpacked data for VoteSubmitted events raised by the SMC contract.
type SMCVoteSubmittedIterator struct {
Event * SMCVoteSubmitted // Event containing the contract specifics and raw log
2018-05-01 21:33:40 -07:00
contract * bind . BoundContract // Generic contract to use for unpacking event data
event string // Event name to use for unpacking event data
logs chan types . Log // Log channel receiving the found contract events
sub ethereum . Subscription // Subscription for errors, completion and termination
done bool // Whether the subscription completed delivering logs
fail error // Occurred error to stop iteration
}
// 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.
2018-05-08 14:55:18 -07:00
func ( it * SMCVoteSubmittedIterator ) Next ( ) bool {
2018-05-01 21:33:40 -07:00
// If the iterator failed, stop iterating
if it . fail != nil {
return false
}
// If the iterator completed, deliver directly whatever's available
if it . done {
select {
case log := <- it . logs :
2018-05-08 14:55:18 -07:00
it . Event = new ( SMCVoteSubmitted )
2018-05-01 21:33:40 -07:00
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
default :
return false
}
}
// Iterator still in progress, wait for either a data or an error event
select {
case log := <- it . logs :
2018-05-08 14:55:18 -07:00
it . Event = new ( SMCVoteSubmitted )
2018-05-01 21:33:40 -07:00
if err := it . contract . UnpackLog ( it . Event , it . event , log ) ; err != nil {
it . fail = err
return false
}
it . Event . Raw = log
return true
case err := <- it . sub . Err ( ) :
it . done = true
it . fail = err
return it . Next ( )
}
}
// Error returns any retrieval or parsing error occurred during filtering.
2018-05-08 14:55:18 -07:00
func ( it * SMCVoteSubmittedIterator ) Error ( ) error {
2018-05-01 21:33:40 -07:00
return it . fail
}
// Close terminates the iteration process, releasing any pending underlying
// resources.
2018-05-08 14:55:18 -07:00
func ( it * SMCVoteSubmittedIterator ) Close ( ) error {
2018-05-01 21:33:40 -07:00
it . sub . Unsubscribe ( )
return nil
}
2018-05-08 14:55:18 -07:00
// SMCVoteSubmitted represents a VoteSubmitted event raised by the SMC contract.
type SMCVoteSubmitted struct {
2018-05-01 21:33:40 -07:00
ShardId * big . Int
ChunkRoot [ 32 ] byte
Period * big . Int
NotaryAddress common . Address
Raw types . Log // Blockchain specific contextual infos
}
2018-05-08 14:55:18 -07:00
// FilterVoteSubmitted is a free log retrieval operation binding the contract event 0xc99370212b708f699fb6945a17eb34d0fc1ccd5b45d88f4d9682593a45d6e833.
2018-05-01 21:33:40 -07:00
//
2018-05-08 14:55:18 -07:00
// Solidity: event VoteSubmitted(shardId indexed uint256, chunkRoot bytes32, period uint256, notaryAddress address)
func ( _SMC * SMCFilterer ) FilterVoteSubmitted ( opts * bind . FilterOpts , shardId [ ] * big . Int ) ( * SMCVoteSubmittedIterator , error ) {
2018-05-01 21:33:40 -07:00
var shardIdRule [ ] interface { }
for _ , shardIdItem := range shardId {
shardIdRule = append ( shardIdRule , shardIdItem )
}
2018-05-08 14:55:18 -07:00
logs , sub , err := _SMC . contract . FilterLogs ( opts , "VoteSubmitted" , shardIdRule )
2018-05-01 21:33:40 -07:00
if err != nil {
return nil , err
}
2018-05-08 14:55:18 -07:00
return & SMCVoteSubmittedIterator { contract : _SMC . contract , event : "VoteSubmitted" , logs : logs , sub : sub } , nil
2018-05-01 21:33:40 -07:00
}
2018-05-08 14:55:18 -07:00
// WatchVoteSubmitted is a free log subscription operation binding the contract event 0xc99370212b708f699fb6945a17eb34d0fc1ccd5b45d88f4d9682593a45d6e833.
2018-05-01 21:33:40 -07:00
//
2018-05-08 14:55:18 -07:00
// Solidity: event VoteSubmitted(shardId indexed uint256, chunkRoot bytes32, period uint256, notaryAddress address)
func ( _SMC * SMCFilterer ) WatchVoteSubmitted ( opts * bind . WatchOpts , sink chan <- * SMCVoteSubmitted , shardId [ ] * big . Int ) ( event . Subscription , error ) {
2018-05-01 21:33:40 -07:00
var shardIdRule [ ] interface { }
for _ , shardIdItem := range shardId {
shardIdRule = append ( shardIdRule , shardIdItem )
}
2018-05-08 14:55:18 -07:00
logs , sub , err := _SMC . contract . WatchLogs ( opts , "VoteSubmitted" , shardIdRule )
2018-05-01 21:33:40 -07:00
if err != nil {
return nil , err
}
return event . NewSubscription ( func ( quit <- chan struct { } ) error {
defer sub . Unsubscribe ( )
for {
select {
case log := <- logs :
// New log arrived, parse the event and forward to the user
2018-05-08 14:55:18 -07:00
event := new ( SMCVoteSubmitted )
if err := _SMC . contract . UnpackLog ( event , "VoteSubmitted" , log ) ; err != nil {
2018-05-01 21:33:40 -07:00
return err
}
event . Raw = log
select {
case sink <- event :
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
case err := <- sub . Err ( ) :
return err
case <- quit :
return nil
}
}
} ) , nil
}