diff --git a/contracts/erc20/erc20.go b/contracts/erc20/erc20.go index ee4aeabda..2ba100e3c 100644 --- a/contracts/erc20/erc20.go +++ b/contracts/erc20/erc20.go @@ -4,6 +4,7 @@ package erc20 import ( + "errors" "math/big" "strings" @@ -17,18 +18,24 @@ import ( // Reference imports to suppress errors if they are not otherwise used. var ( + _ = errors.New _ = big.NewInt _ = strings.NewReader _ = ethereum.NotFound - _ = abi.U256 _ = bind.Bind _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription ) +// Erc20MetaData contains all meta data concerning the Erc20 contract. +var Erc20MetaData = &bind.MetaData{ + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + // Erc20ABI is the input ABI used to generate the binding from. -const Erc20ABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" +// Deprecated: Use Erc20MetaData.ABI instead. +var Erc20ABI = Erc20MetaData.ABI // Erc20 is an auto generated Go binding around an Ethereum contract. type Erc20 struct { @@ -138,7 +145,7 @@ func bindErc20(address common.Address, caller bind.ContractCaller, transactor bi // 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 (_Erc20 *Erc20Raw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { +func (_Erc20 *Erc20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Erc20.Contract.Erc20Caller.contract.Call(opts, result, method, params...) } @@ -157,7 +164,7 @@ func (_Erc20 *Erc20Raw) Transact(opts *bind.TransactOpts, method string, params // 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 (_Erc20 *Erc20CallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { +func (_Erc20 *Erc20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Erc20.Contract.contract.Call(opts, result, method, params...) } @@ -174,78 +181,93 @@ func (_Erc20 *Erc20TransactorRaw) Transact(opts *bind.TransactOpts, method strin // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // -// Solidity: function allowance(address owner, address spender) constant returns(uint256) +// Solidity: function allowance(address owner, address spender) view returns(uint256) func (_Erc20 *Erc20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Erc20.contract.Call(opts, out, "allowance", owner, spender) - return *ret0, err + var out []interface{} + err := _Erc20.contract.Call(opts, &out, "allowance", owner, spender) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // -// Solidity: function allowance(address owner, address spender) constant returns(uint256) +// Solidity: function allowance(address owner, address spender) view returns(uint256) func (_Erc20 *Erc20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { return _Erc20.Contract.Allowance(&_Erc20.CallOpts, owner, spender) } // Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. // -// Solidity: function allowance(address owner, address spender) constant returns(uint256) +// Solidity: function allowance(address owner, address spender) view returns(uint256) func (_Erc20 *Erc20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { return _Erc20.Contract.Allowance(&_Erc20.CallOpts, owner, spender) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // -// Solidity: function balanceOf(address owner) constant returns(uint256) +// Solidity: function balanceOf(address owner) view returns(uint256) func (_Erc20 *Erc20Caller) BalanceOf(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Erc20.contract.Call(opts, out, "balanceOf", owner) - return *ret0, err + var out []interface{} + err := _Erc20.contract.Call(opts, &out, "balanceOf", owner) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // -// Solidity: function balanceOf(address owner) constant returns(uint256) +// Solidity: function balanceOf(address owner) view returns(uint256) func (_Erc20 *Erc20Session) BalanceOf(owner common.Address) (*big.Int, error) { return _Erc20.Contract.BalanceOf(&_Erc20.CallOpts, owner) } // BalanceOf is a free data retrieval call binding the contract method 0x70a08231. // -// Solidity: function balanceOf(address owner) constant returns(uint256) +// Solidity: function balanceOf(address owner) view returns(uint256) func (_Erc20 *Erc20CallerSession) BalanceOf(owner common.Address) (*big.Int, error) { return _Erc20.Contract.BalanceOf(&_Erc20.CallOpts, owner) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // -// Solidity: function totalSupply() constant returns(uint256) +// Solidity: function totalSupply() view returns(uint256) func (_Erc20 *Erc20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Erc20.contract.Call(opts, out, "totalSupply") - return *ret0, err + var out []interface{} + err := _Erc20.contract.Call(opts, &out, "totalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // -// Solidity: function totalSupply() constant returns(uint256) +// Solidity: function totalSupply() view returns(uint256) func (_Erc20 *Erc20Session) TotalSupply() (*big.Int, error) { return _Erc20.Contract.TotalSupply(&_Erc20.CallOpts) } // TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. // -// Solidity: function totalSupply() constant returns(uint256) +// Solidity: function totalSupply() view returns(uint256) func (_Erc20 *Erc20CallerSession) TotalSupply() (*big.Int, error) { return _Erc20.Contract.TotalSupply(&_Erc20.CallOpts) } @@ -505,6 +527,7 @@ func (_Erc20 *Erc20Filterer) ParseApproval(log types.Log) (*Erc20Approval, error if err := _Erc20.contract.UnpackLog(event, "Approval", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -658,5 +681,6 @@ func (_Erc20 *Erc20Filterer) ParseTransfer(log types.Log) (*Erc20Transfer, error if err := _Erc20.contract.UnpackLog(event, "Transfer", log); err != nil { return nil, err } + event.Raw = log return event, nil } diff --git a/contracts/rootchain/rootchain.go b/contracts/rootchain/rootchain.go index 5bfe5f2d6..d7562cf11 100644 --- a/contracts/rootchain/rootchain.go +++ b/contracts/rootchain/rootchain.go @@ -4,19 +4,21 @@ package rootchain import ( + "errors" "math/big" "strings" - ethereum "github.com/maticnetwork/bor" - "github.com/maticnetwork/bor/accounts/abi" - "github.com/maticnetwork/bor/accounts/abi/bind" - "github.com/maticnetwork/bor/common" - "github.com/maticnetwork/bor/core/types" - "github.com/maticnetwork/bor/event" + ethereum "github.com/ethereum/go-ethereum" + "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" + "github.com/ethereum/go-ethereum/event" ) // Reference imports to suppress errors if they are not otherwise used. var ( + _ = errors.New _ = big.NewInt _ = strings.NewReader _ = ethereum.NotFound @@ -26,8 +28,14 @@ var ( _ = event.NewSubscription ) +// RootchainMetaData contains all meta data concerning the Rootchain contract. +var RootchainMetaData = &bind.MetaData{ + ABI: "[{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"headerBlocks\",\"outputs\":[{\"name\":\"root\",\"type\":\"bytes32\"},{\"name\":\"start\",\"type\":\"uint256\"},{\"name\":\"end\",\"type\":\"uint256\"},{\"name\":\"createdAt\",\"type\":\"uint256\"},{\"name\":\"proposer\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"data\",\"type\":\"bytes\"},{\"name\":\"sigs\",\"type\":\"uint256[3][]\"}],\"name\":\"submitCheckpoint\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"data\",\"type\":\"bytes\"},{\"name\":\"sigs\",\"type\":\"bytes\"}],\"name\":\"submitHeaderBlock\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getLastChildBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentHeaderBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"proposer\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"headerBlockId\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"reward\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"start\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"end\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"root\",\"type\":\"bytes32\"}],\"name\":\"NewHeaderBlock\",\"type\":\"event\"}]", +} + // RootchainABI is the input ABI used to generate the binding from. -const RootchainABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"headerBlocks\",\"outputs\":[{\"name\":\"root\",\"type\":\"bytes32\"},{\"name\":\"start\",\"type\":\"uint256\"},{\"name\":\"end\",\"type\":\"uint256\"},{\"name\":\"createdAt\",\"type\":\"uint256\"},{\"name\":\"proposer\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"data\",\"type\":\"bytes\"},{\"name\":\"sigs\",\"type\":\"uint256[3][]\"}],\"name\":\"submitCheckpoint\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"data\",\"type\":\"bytes\"},{\"name\":\"sigs\",\"type\":\"bytes\"}],\"name\":\"submitHeaderBlock\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getLastChildBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentHeaderBlock\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"proposer\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"headerBlockId\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"reward\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"start\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"end\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"root\",\"type\":\"bytes32\"}],\"name\":\"NewHeaderBlock\",\"type\":\"event\"}]" +// Deprecated: Use RootchainMetaData.ABI instead. +var RootchainABI = RootchainMetaData.ABI // Rootchain is an auto generated Go binding around an Ethereum contract. type Rootchain struct { @@ -137,7 +145,7 @@ func bindRootchain(address common.Address, caller bind.ContractCaller, transacto // 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 (_Rootchain *RootchainRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { +func (_Rootchain *RootchainRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Rootchain.Contract.RootchainCaller.contract.Call(opts, result, method, params...) } @@ -156,7 +164,7 @@ func (_Rootchain *RootchainRaw) Transact(opts *bind.TransactOpts, method string, // 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 (_Rootchain *RootchainCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { +func (_Rootchain *RootchainCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Rootchain.Contract.contract.Call(opts, result, method, params...) } @@ -175,12 +183,17 @@ func (_Rootchain *RootchainTransactorRaw) Transact(opts *bind.TransactOpts, meth // // Solidity: function currentHeaderBlock() view returns(uint256) func (_Rootchain *RootchainCaller) CurrentHeaderBlock(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Rootchain.contract.Call(opts, out, "currentHeaderBlock") - return *ret0, err + var out []interface{} + err := _Rootchain.contract.Call(opts, &out, "currentHeaderBlock") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // CurrentHeaderBlock is a free data retrieval call binding the contract method 0xec7e4855. @@ -201,12 +214,17 @@ func (_Rootchain *RootchainCallerSession) CurrentHeaderBlock() (*big.Int, error) // // Solidity: function getLastChildBlock() view returns(uint256) func (_Rootchain *RootchainCaller) GetLastChildBlock(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Rootchain.contract.Call(opts, out, "getLastChildBlock") - return *ret0, err + var out []interface{} + err := _Rootchain.contract.Call(opts, &out, "getLastChildBlock") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // GetLastChildBlock is a free data retrieval call binding the contract method 0xb87e1b66. @@ -233,16 +251,28 @@ func (_Rootchain *RootchainCaller) HeaderBlocks(opts *bind.CallOpts, arg0 *big.I CreatedAt *big.Int Proposer common.Address }, error) { - ret := new(struct { + var out []interface{} + err := _Rootchain.contract.Call(opts, &out, "headerBlocks", arg0) + + outstruct := new(struct { Root [32]byte Start *big.Int End *big.Int CreatedAt *big.Int Proposer common.Address }) - out := ret - err := _Rootchain.contract.Call(opts, out, "headerBlocks", arg0) - return *ret, err + if err != nil { + return *outstruct, err + } + + outstruct.Root = *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + outstruct.Start = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.End = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.CreatedAt = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.Proposer = *abi.ConvertType(out[4], new(common.Address)).(*common.Address) + + return *outstruct, err + } // HeaderBlocks is a free data retrieval call binding the contract method 0x41539d4a. @@ -474,5 +504,6 @@ func (_Rootchain *RootchainFilterer) ParseNewHeaderBlock(log types.Log) (*Rootch if err := _Rootchain.contract.UnpackLog(event, "NewHeaderBlock", log); err != nil { return nil, err } + event.Raw = log return event, nil } diff --git a/contracts/slashmanager/slashmanager.go b/contracts/slashmanager/slashmanager.go index 75dfe4963..b0f80fa2d 100644 --- a/contracts/slashmanager/slashmanager.go +++ b/contracts/slashmanager/slashmanager.go @@ -4,31 +4,38 @@ package slashmanager import ( + "errors" "math/big" "strings" - ethereum "github.com/maticnetwork/bor" - "github.com/maticnetwork/bor/accounts/abi" - "github.com/maticnetwork/bor/accounts/abi/bind" - "github.com/maticnetwork/bor/common" - "github.com/maticnetwork/bor/core/types" - "github.com/maticnetwork/bor/event" + ethereum "github.com/ethereum/go-ethereum" + "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" + "github.com/ethereum/go-ethereum/event" ) // Reference imports to suppress errors if they are not otherwise used. var ( + _ = errors.New _ = big.NewInt _ = strings.NewReader _ = ethereum.NotFound - _ = abi.U256 _ = bind.Bind _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription ) +// SlashmanagerMetaData contains all meta data concerning the Slashmanager contract. +var SlashmanagerMetaData = &bind.MetaData{ + ABI: "[{\"constant\":true,\"inputs\":[],\"name\":\"proposerRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"drainTokens\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"jailCheckpoints\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"sigs\",\"type\":\"bytes\"}],\"name\":\"updateSlashedAmounts\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"slashingNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newReportRate\",\"type\":\"uint256\"}],\"name\":\"updateReportRate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reportRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"VOTE_TYPE\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newProposerRate\",\"type\":\"uint256\"}],\"name\":\"updateProposerRate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"string\",\"name\":\"_heimdallId\",\"type\":\"string\"}],\"name\":\"setHeimdallId\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"logger\",\"outputs\":[{\"internalType\":\"contractStakingInfo\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"heimdallId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_registry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_logger\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_heimdallId\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]", +} + // SlashmanagerABI is the input ABI used to generate the binding from. -const SlashmanagerABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"proposerRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"drainTokens\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"jailCheckpoints\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"sigs\",\"type\":\"bytes\"}],\"name\":\"updateSlashedAmounts\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"slashingNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newReportRate\",\"type\":\"uint256\"}],\"name\":\"updateReportRate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"reportRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"VOTE_TYPE\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newProposerRate\",\"type\":\"uint256\"}],\"name\":\"updateProposerRate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"string\",\"name\":\"_heimdallId\",\"type\":\"string\"}],\"name\":\"setHeimdallId\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"logger\",\"outputs\":[{\"internalType\":\"contractStakingInfo\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"heimdallId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_registry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_logger\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"_heimdallId\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]" +// Deprecated: Use SlashmanagerMetaData.ABI instead. +var SlashmanagerABI = SlashmanagerMetaData.ABI // Slashmanager is an auto generated Go binding around an Ethereum contract. type Slashmanager struct { @@ -138,7 +145,7 @@ func bindSlashmanager(address common.Address, caller bind.ContractCaller, transa // 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 (_Slashmanager *SlashmanagerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { +func (_Slashmanager *SlashmanagerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Slashmanager.Contract.SlashmanagerCaller.contract.Call(opts, result, method, params...) } @@ -157,7 +164,7 @@ func (_Slashmanager *SlashmanagerRaw) Transact(opts *bind.TransactOpts, method s // 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 (_Slashmanager *SlashmanagerCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { +func (_Slashmanager *SlashmanagerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Slashmanager.Contract.contract.Call(opts, result, method, params...) } @@ -174,260 +181,310 @@ func (_Slashmanager *SlashmanagerTransactorRaw) Transact(opts *bind.TransactOpts // VOTETYPE is a free data retrieval call binding the contract method 0xd5b844eb. // -// Solidity: function VOTE_TYPE() constant returns(uint8) +// Solidity: function VOTE_TYPE() view returns(uint8) func (_Slashmanager *SlashmanagerCaller) VOTETYPE(opts *bind.CallOpts) (uint8, error) { - var ( - ret0 = new(uint8) - ) - out := ret0 - err := _Slashmanager.contract.Call(opts, out, "VOTE_TYPE") - return *ret0, err + var out []interface{} + err := _Slashmanager.contract.Call(opts, &out, "VOTE_TYPE") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + } // VOTETYPE is a free data retrieval call binding the contract method 0xd5b844eb. // -// Solidity: function VOTE_TYPE() constant returns(uint8) +// Solidity: function VOTE_TYPE() view returns(uint8) func (_Slashmanager *SlashmanagerSession) VOTETYPE() (uint8, error) { return _Slashmanager.Contract.VOTETYPE(&_Slashmanager.CallOpts) } // VOTETYPE is a free data retrieval call binding the contract method 0xd5b844eb. // -// Solidity: function VOTE_TYPE() constant returns(uint8) +// Solidity: function VOTE_TYPE() view returns(uint8) func (_Slashmanager *SlashmanagerCallerSession) VOTETYPE() (uint8, error) { return _Slashmanager.Contract.VOTETYPE(&_Slashmanager.CallOpts) } // HeimdallId is a free data retrieval call binding the contract method 0xfbc3dd36. // -// Solidity: function heimdallId() constant returns(bytes32) +// Solidity: function heimdallId() view returns(bytes32) func (_Slashmanager *SlashmanagerCaller) HeimdallId(opts *bind.CallOpts) ([32]byte, error) { - var ( - ret0 = new([32]byte) - ) - out := ret0 - err := _Slashmanager.contract.Call(opts, out, "heimdallId") - return *ret0, err + var out []interface{} + err := _Slashmanager.contract.Call(opts, &out, "heimdallId") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + } // HeimdallId is a free data retrieval call binding the contract method 0xfbc3dd36. // -// Solidity: function heimdallId() constant returns(bytes32) +// Solidity: function heimdallId() view returns(bytes32) func (_Slashmanager *SlashmanagerSession) HeimdallId() ([32]byte, error) { return _Slashmanager.Contract.HeimdallId(&_Slashmanager.CallOpts) } // HeimdallId is a free data retrieval call binding the contract method 0xfbc3dd36. // -// Solidity: function heimdallId() constant returns(bytes32) +// Solidity: function heimdallId() view returns(bytes32) func (_Slashmanager *SlashmanagerCallerSession) HeimdallId() ([32]byte, error) { return _Slashmanager.Contract.HeimdallId(&_Slashmanager.CallOpts) } // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. // -// Solidity: function isOwner() constant returns(bool) +// Solidity: function isOwner() view returns(bool) func (_Slashmanager *SlashmanagerCaller) IsOwner(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _Slashmanager.contract.Call(opts, out, "isOwner") - return *ret0, err + var out []interface{} + err := _Slashmanager.contract.Call(opts, &out, "isOwner") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + } // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. // -// Solidity: function isOwner() constant returns(bool) +// Solidity: function isOwner() view returns(bool) func (_Slashmanager *SlashmanagerSession) IsOwner() (bool, error) { return _Slashmanager.Contract.IsOwner(&_Slashmanager.CallOpts) } // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. // -// Solidity: function isOwner() constant returns(bool) +// Solidity: function isOwner() view returns(bool) func (_Slashmanager *SlashmanagerCallerSession) IsOwner() (bool, error) { return _Slashmanager.Contract.IsOwner(&_Slashmanager.CallOpts) } // JailCheckpoints is a free data retrieval call binding the contract method 0x556b2ce9. // -// Solidity: function jailCheckpoints() constant returns(uint256) +// Solidity: function jailCheckpoints() view returns(uint256) func (_Slashmanager *SlashmanagerCaller) JailCheckpoints(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Slashmanager.contract.Call(opts, out, "jailCheckpoints") - return *ret0, err + var out []interface{} + err := _Slashmanager.contract.Call(opts, &out, "jailCheckpoints") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // JailCheckpoints is a free data retrieval call binding the contract method 0x556b2ce9. // -// Solidity: function jailCheckpoints() constant returns(uint256) +// Solidity: function jailCheckpoints() view returns(uint256) func (_Slashmanager *SlashmanagerSession) JailCheckpoints() (*big.Int, error) { return _Slashmanager.Contract.JailCheckpoints(&_Slashmanager.CallOpts) } // JailCheckpoints is a free data retrieval call binding the contract method 0x556b2ce9. // -// Solidity: function jailCheckpoints() constant returns(uint256) +// Solidity: function jailCheckpoints() view returns(uint256) func (_Slashmanager *SlashmanagerCallerSession) JailCheckpoints() (*big.Int, error) { return _Slashmanager.Contract.JailCheckpoints(&_Slashmanager.CallOpts) } // Logger is a free data retrieval call binding the contract method 0xf24ccbfe. // -// Solidity: function logger() constant returns(address) +// Solidity: function logger() view returns(address) func (_Slashmanager *SlashmanagerCaller) Logger(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Slashmanager.contract.Call(opts, out, "logger") - return *ret0, err + var out []interface{} + err := _Slashmanager.contract.Call(opts, &out, "logger") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // Logger is a free data retrieval call binding the contract method 0xf24ccbfe. // -// Solidity: function logger() constant returns(address) +// Solidity: function logger() view returns(address) func (_Slashmanager *SlashmanagerSession) Logger() (common.Address, error) { return _Slashmanager.Contract.Logger(&_Slashmanager.CallOpts) } // Logger is a free data retrieval call binding the contract method 0xf24ccbfe. // -// Solidity: function logger() constant returns(address) +// Solidity: function logger() view returns(address) func (_Slashmanager *SlashmanagerCallerSession) Logger() (common.Address, error) { return _Slashmanager.Contract.Logger(&_Slashmanager.CallOpts) } // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function owner() constant returns(address) +// Solidity: function owner() view returns(address) func (_Slashmanager *SlashmanagerCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Slashmanager.contract.Call(opts, out, "owner") - return *ret0, err + var out []interface{} + err := _Slashmanager.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function owner() constant returns(address) +// Solidity: function owner() view returns(address) func (_Slashmanager *SlashmanagerSession) Owner() (common.Address, error) { return _Slashmanager.Contract.Owner(&_Slashmanager.CallOpts) } // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function owner() constant returns(address) +// Solidity: function owner() view returns(address) func (_Slashmanager *SlashmanagerCallerSession) Owner() (common.Address, error) { return _Slashmanager.Contract.Owner(&_Slashmanager.CallOpts) } // ProposerRate is a free data retrieval call binding the contract method 0x3199e305. // -// Solidity: function proposerRate() constant returns(uint256) +// Solidity: function proposerRate() view returns(uint256) func (_Slashmanager *SlashmanagerCaller) ProposerRate(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Slashmanager.contract.Call(opts, out, "proposerRate") - return *ret0, err + var out []interface{} + err := _Slashmanager.contract.Call(opts, &out, "proposerRate") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // ProposerRate is a free data retrieval call binding the contract method 0x3199e305. // -// Solidity: function proposerRate() constant returns(uint256) +// Solidity: function proposerRate() view returns(uint256) func (_Slashmanager *SlashmanagerSession) ProposerRate() (*big.Int, error) { return _Slashmanager.Contract.ProposerRate(&_Slashmanager.CallOpts) } // ProposerRate is a free data retrieval call binding the contract method 0x3199e305. // -// Solidity: function proposerRate() constant returns(uint256) +// Solidity: function proposerRate() view returns(uint256) func (_Slashmanager *SlashmanagerCallerSession) ProposerRate() (*big.Int, error) { return _Slashmanager.Contract.ProposerRate(&_Slashmanager.CallOpts) } // Registry is a free data retrieval call binding the contract method 0x7b103999. // -// Solidity: function registry() constant returns(address) +// Solidity: function registry() view returns(address) func (_Slashmanager *SlashmanagerCaller) Registry(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Slashmanager.contract.Call(opts, out, "registry") - return *ret0, err + var out []interface{} + err := _Slashmanager.contract.Call(opts, &out, "registry") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // Registry is a free data retrieval call binding the contract method 0x7b103999. // -// Solidity: function registry() constant returns(address) +// Solidity: function registry() view returns(address) func (_Slashmanager *SlashmanagerSession) Registry() (common.Address, error) { return _Slashmanager.Contract.Registry(&_Slashmanager.CallOpts) } // Registry is a free data retrieval call binding the contract method 0x7b103999. // -// Solidity: function registry() constant returns(address) +// Solidity: function registry() view returns(address) func (_Slashmanager *SlashmanagerCallerSession) Registry() (common.Address, error) { return _Slashmanager.Contract.Registry(&_Slashmanager.CallOpts) } // ReportRate is a free data retrieval call binding the contract method 0xc25593be. // -// Solidity: function reportRate() constant returns(uint256) +// Solidity: function reportRate() view returns(uint256) func (_Slashmanager *SlashmanagerCaller) ReportRate(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Slashmanager.contract.Call(opts, out, "reportRate") - return *ret0, err + var out []interface{} + err := _Slashmanager.contract.Call(opts, &out, "reportRate") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // ReportRate is a free data retrieval call binding the contract method 0xc25593be. // -// Solidity: function reportRate() constant returns(uint256) +// Solidity: function reportRate() view returns(uint256) func (_Slashmanager *SlashmanagerSession) ReportRate() (*big.Int, error) { return _Slashmanager.Contract.ReportRate(&_Slashmanager.CallOpts) } // ReportRate is a free data retrieval call binding the contract method 0xc25593be. // -// Solidity: function reportRate() constant returns(uint256) +// Solidity: function reportRate() view returns(uint256) func (_Slashmanager *SlashmanagerCallerSession) ReportRate() (*big.Int, error) { return _Slashmanager.Contract.ReportRate(&_Slashmanager.CallOpts) } // SlashingNonce is a free data retrieval call binding the contract method 0xa2d32176. // -// Solidity: function slashingNonce() constant returns(uint256) +// Solidity: function slashingNonce() view returns(uint256) func (_Slashmanager *SlashmanagerCaller) SlashingNonce(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Slashmanager.contract.Call(opts, out, "slashingNonce") - return *ret0, err + var out []interface{} + err := _Slashmanager.contract.Call(opts, &out, "slashingNonce") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // SlashingNonce is a free data retrieval call binding the contract method 0xa2d32176. // -// Solidity: function slashingNonce() constant returns(uint256) +// Solidity: function slashingNonce() view returns(uint256) func (_Slashmanager *SlashmanagerSession) SlashingNonce() (*big.Int, error) { return _Slashmanager.Contract.SlashingNonce(&_Slashmanager.CallOpts) } // SlashingNonce is a free data retrieval call binding the contract method 0xa2d32176. // -// Solidity: function slashingNonce() constant returns(uint256) +// Solidity: function slashingNonce() view returns(uint256) func (_Slashmanager *SlashmanagerCallerSession) SlashingNonce() (*big.Int, error) { return _Slashmanager.Contract.SlashingNonce(&_Slashmanager.CallOpts) } @@ -728,5 +785,6 @@ func (_Slashmanager *SlashmanagerFilterer) ParseOwnershipTransferred(log types.L if err := _Slashmanager.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { return nil, err } + event.Raw = log return event, nil } diff --git a/contracts/stakemanager/stakemanager.go b/contracts/stakemanager/stakemanager.go index db5774df2..b09a94806 100644 --- a/contracts/stakemanager/stakemanager.go +++ b/contracts/stakemanager/stakemanager.go @@ -4,31 +4,38 @@ package stakemanager import ( + "errors" "math/big" "strings" - ethereum "github.com/maticnetwork/bor" - "github.com/maticnetwork/bor/accounts/abi" - "github.com/maticnetwork/bor/accounts/abi/bind" - "github.com/maticnetwork/bor/common" - "github.com/maticnetwork/bor/core/types" - "github.com/maticnetwork/bor/event" + ethereum "github.com/ethereum/go-ethereum" + "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" + "github.com/ethereum/go-ethereum/event" ) // Reference imports to suppress errors if they are not otherwise used. var ( + _ = errors.New _ = big.NewInt _ = strings.NewReader _ = ethereum.NotFound - _ = abi.U256 _ = bind.Bind _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription ) +// StakemanagerMetaData contains all meta data concerning the Stakemanager contract. +var StakemanagerMetaData = &bind.MetaData{ + ABI: "[{\"constant\":true,\"inputs\":[],\"name\":\"getCurrentValidatorSet\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"heimdallFee\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"acceptDelegation\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"signerPubkey\",\"type\":\"bytes\"}],\"name\":\"stake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockInterval\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"voteHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"proposer\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"sigs\",\"type\":\"bytes\"}],\"name\":\"checkSignatures\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_limit\",\"type\":\"uint256\"}],\"name\":\"updateSignerUpdateLimit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"auctionPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"WITHDRAWAL_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_registry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_rootchain\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_NFTContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_stakingLogger\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_ValidatorShareFactory\",\"type\":\"address\"}],\"name\":\"updateConstructor\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"setToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newThreshold\",\"type\":\"uint256\"}],\"name\":\"updateValidatorThreshold\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getValidatorId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"accountStateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"checkPointBlockInterval\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"isValidator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"stakeRewards\",\"type\":\"bool\"}],\"name\":\"restake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"unstake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"NFTContract\",\"outputs\":[{\"internalType\":\"contractStakingNFT\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"proposerBonus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"validators\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"activationEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deactivationEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jailTime\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enumStakeManagerStorage.Status\",\"name\":\"status\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"signerToValidator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"unJail\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"totalStakedFor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"signerUpdateLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"validatorThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"heimdallFee\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"acceptDelegation\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"signerPubkey\",\"type\":\"bytes\"}],\"name\":\"stakeFor\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"startAuction\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"validatorAuction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"startEpoch\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"delegationEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"NFTCounter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"getValidatorContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"governance\",\"outputs\":[{\"internalType\":\"contractIGovernance\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"validatorState\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"amount\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"stakerCount\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_slashingInfoList\",\"type\":\"bytes\"}],\"name\":\"slash\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"heimdallFee\",\"type\":\"uint256\"}],\"name\":\"topUpForFee\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"accumFeeAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"claimFee\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"delegationDeposit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"supportsHistory\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"dynasty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"replacementCoolDown\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userFeeExit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"CHECKPOINT_REWARD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentValidatorSetSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalStaked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"epoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"forceUnstake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"withdrawRewards\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rootChain\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalHeimdallFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newProposerBonus\",\"type\":\"uint256\"}],\"name\":\"updateProposerBonus\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"amount\",\"type\":\"int256\"}],\"name\":\"updateValidatorState\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_blocks\",\"type\":\"uint256\"}],\"name\":\"updateCheckPointBlockInterval\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentValidatorSetTotalStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unlock\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"withdrawalDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minHeimdallFee\",\"type\":\"uint256\"}],\"name\":\"updateMinAmounts\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"voteHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"sigs\",\"type\":\"bytes\"}],\"name\":\"verifyConsensus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"transferFunds\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"contractValidatorShareFactory\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"heimdallFee\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"acceptDelegation\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"signerPubkey\",\"type\":\"bytes\"}],\"name\":\"confirmAuctionBid\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newReward\",\"type\":\"uint256\"}],\"name\":\"updateCheckpointReward\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalRewardsLiquidated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"locked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"pub\",\"type\":\"bytes\"}],\"name\":\"pubToAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"latestSignerUpdateEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"unstakeClaim\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newDynasty\",\"type\":\"uint256\"}],\"name\":\"updateDynastyValue\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newRootChain\",\"type\":\"address\"}],\"name\":\"changeRootChain\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"validatorStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"logger\",\"outputs\":[{\"internalType\":\"contractStakingInfo\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"setDelegationEnabled\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signerPubkey\",\"type\":\"bytes\"}],\"name\":\"updateSigner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"forNCheckpoints\",\"type\":\"uint256\"}],\"name\":\"stopAuctions\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"lock\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minHeimdallFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousRootChain\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newRootChain\",\"type\":\"address\"}],\"name\":\"RootChainChanged\",\"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\"}]", +} + // StakemanagerABI is the input ABI used to generate the binding from. -const StakemanagerABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"getCurrentValidatorSet\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"heimdallFee\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"acceptDelegation\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"signerPubkey\",\"type\":\"bytes\"}],\"name\":\"stake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockInterval\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"voteHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"stateRoot\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"proposer\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"sigs\",\"type\":\"bytes\"}],\"name\":\"checkSignatures\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_limit\",\"type\":\"uint256\"}],\"name\":\"updateSignerUpdateLimit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"auctionPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"WITHDRAWAL_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_registry\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_rootchain\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_NFTContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_stakingLogger\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_ValidatorShareFactory\",\"type\":\"address\"}],\"name\":\"updateConstructor\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"}],\"name\":\"setToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newThreshold\",\"type\":\"uint256\"}],\"name\":\"updateValidatorThreshold\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getValidatorId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"accountStateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"checkPointBlockInterval\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"isValidator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"stakeRewards\",\"type\":\"bool\"}],\"name\":\"restake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"unstake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"NFTContract\",\"outputs\":[{\"internalType\":\"contractStakingNFT\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"proposerBonus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"validators\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"activationEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deactivationEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"jailTime\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"enumStakeManagerStorage.Status\",\"name\":\"status\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"signerToValidator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"unJail\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"totalStakedFor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"signerUpdateLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"validatorThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"heimdallFee\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"acceptDelegation\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"signerPubkey\",\"type\":\"bytes\"}],\"name\":\"stakeFor\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"startAuction\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"validatorAuction\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"startEpoch\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"delegationEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"NFTCounter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"getValidatorContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"governance\",\"outputs\":[{\"internalType\":\"contractIGovernance\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"validatorState\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"amount\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"stakerCount\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_slashingInfoList\",\"type\":\"bytes\"}],\"name\":\"slash\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"heimdallFee\",\"type\":\"uint256\"}],\"name\":\"topUpForFee\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"accumFeeAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"claimFee\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"delegationDeposit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"supportsHistory\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"dynasty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"replacementCoolDown\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userFeeExit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"CHECKPOINT_REWARD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentValidatorSetSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalStaked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"epoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"forceUnstake\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"withdrawRewards\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"rootChain\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalHeimdallFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newProposerBonus\",\"type\":\"uint256\"}],\"name\":\"updateProposerBonus\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"int256\",\"name\":\"amount\",\"type\":\"int256\"}],\"name\":\"updateValidatorState\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_blocks\",\"type\":\"uint256\"}],\"name\":\"updateCheckPointBlockInterval\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentValidatorSetTotalStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unlock\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"withdrawalDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minHeimdallFee\",\"type\":\"uint256\"}],\"name\":\"updateMinAmounts\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"voteHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"sigs\",\"type\":\"bytes\"}],\"name\":\"verifyConsensus\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"transferFunds\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"contractValidatorShareFactory\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"heimdallFee\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"acceptDelegation\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"signerPubkey\",\"type\":\"bytes\"}],\"name\":\"confirmAuctionBid\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newReward\",\"type\":\"uint256\"}],\"name\":\"updateCheckpointReward\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalRewardsLiquidated\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"locked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"pub\",\"type\":\"bytes\"}],\"name\":\"pubToAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"latestSignerUpdateEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"unstakeClaim\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newDynasty\",\"type\":\"uint256\"}],\"name\":\"updateDynastyValue\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newRootChain\",\"type\":\"address\"}],\"name\":\"changeRootChain\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"validatorStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"logger\",\"outputs\":[{\"internalType\":\"contractStakingInfo\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"bool\",\"name\":\"enabled\",\"type\":\"bool\"}],\"name\":\"setDelegationEnabled\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"signerPubkey\",\"type\":\"bytes\"}],\"name\":\"updateSigner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"forNCheckpoints\",\"type\":\"uint256\"}],\"name\":\"stopAuctions\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"lock\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minHeimdallFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contractIERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousRootChain\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newRootChain\",\"type\":\"address\"}],\"name\":\"RootChainChanged\",\"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\"}]" +// Deprecated: Use StakemanagerMetaData.ABI instead. +var StakemanagerABI = StakemanagerMetaData.ABI // Stakemanager is an auto generated Go binding around an Ethereum contract. type Stakemanager struct { @@ -138,7 +145,7 @@ func bindStakemanager(address common.Address, caller bind.ContractCaller, transa // 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 (_Stakemanager *StakemanagerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { +func (_Stakemanager *StakemanagerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Stakemanager.Contract.StakemanagerCaller.contract.Call(opts, result, method, params...) } @@ -157,7 +164,7 @@ func (_Stakemanager *StakemanagerRaw) Transact(opts *bind.TransactOpts, method s // 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 (_Stakemanager *StakemanagerCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { +func (_Stakemanager *StakemanagerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Stakemanager.Contract.contract.Call(opts, result, method, params...) } @@ -174,1117 +181,1337 @@ func (_Stakemanager *StakemanagerTransactorRaw) Transact(opts *bind.TransactOpts // CHECKPOINTREWARD is a free data retrieval call binding the contract method 0x7d669752. // -// Solidity: function CHECKPOINT_REWARD() constant returns(uint256) +// Solidity: function CHECKPOINT_REWARD() view returns(uint256) func (_Stakemanager *StakemanagerCaller) CHECKPOINTREWARD(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "CHECKPOINT_REWARD") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "CHECKPOINT_REWARD") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // CHECKPOINTREWARD is a free data retrieval call binding the contract method 0x7d669752. // -// Solidity: function CHECKPOINT_REWARD() constant returns(uint256) +// Solidity: function CHECKPOINT_REWARD() view returns(uint256) func (_Stakemanager *StakemanagerSession) CHECKPOINTREWARD() (*big.Int, error) { return _Stakemanager.Contract.CHECKPOINTREWARD(&_Stakemanager.CallOpts) } // CHECKPOINTREWARD is a free data retrieval call binding the contract method 0x7d669752. // -// Solidity: function CHECKPOINT_REWARD() constant returns(uint256) +// Solidity: function CHECKPOINT_REWARD() view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) CHECKPOINTREWARD() (*big.Int, error) { return _Stakemanager.Contract.CHECKPOINTREWARD(&_Stakemanager.CallOpts) } // NFTContract is a free data retrieval call binding the contract method 0x31c2273b. // -// Solidity: function NFTContract() constant returns(address) +// Solidity: function NFTContract() view returns(address) func (_Stakemanager *StakemanagerCaller) NFTContract(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "NFTContract") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "NFTContract") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // NFTContract is a free data retrieval call binding the contract method 0x31c2273b. // -// Solidity: function NFTContract() constant returns(address) +// Solidity: function NFTContract() view returns(address) func (_Stakemanager *StakemanagerSession) NFTContract() (common.Address, error) { return _Stakemanager.Contract.NFTContract(&_Stakemanager.CallOpts) } // NFTContract is a free data retrieval call binding the contract method 0x31c2273b. // -// Solidity: function NFTContract() constant returns(address) +// Solidity: function NFTContract() view returns(address) func (_Stakemanager *StakemanagerCallerSession) NFTContract() (common.Address, error) { return _Stakemanager.Contract.NFTContract(&_Stakemanager.CallOpts) } // NFTCounter is a free data retrieval call binding the contract method 0x5508d8e1. // -// Solidity: function NFTCounter() constant returns(uint256) +// Solidity: function NFTCounter() view returns(uint256) func (_Stakemanager *StakemanagerCaller) NFTCounter(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "NFTCounter") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "NFTCounter") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // NFTCounter is a free data retrieval call binding the contract method 0x5508d8e1. // -// Solidity: function NFTCounter() constant returns(uint256) +// Solidity: function NFTCounter() view returns(uint256) func (_Stakemanager *StakemanagerSession) NFTCounter() (*big.Int, error) { return _Stakemanager.Contract.NFTCounter(&_Stakemanager.CallOpts) } // NFTCounter is a free data retrieval call binding the contract method 0x5508d8e1. // -// Solidity: function NFTCounter() constant returns(uint256) +// Solidity: function NFTCounter() view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) NFTCounter() (*big.Int, error) { return _Stakemanager.Contract.NFTCounter(&_Stakemanager.CallOpts) } // WITHDRAWALDELAY is a free data retrieval call binding the contract method 0x0ebb172a. // -// Solidity: function WITHDRAWAL_DELAY() constant returns(uint256) +// Solidity: function WITHDRAWAL_DELAY() view returns(uint256) func (_Stakemanager *StakemanagerCaller) WITHDRAWALDELAY(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "WITHDRAWAL_DELAY") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "WITHDRAWAL_DELAY") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // WITHDRAWALDELAY is a free data retrieval call binding the contract method 0x0ebb172a. // -// Solidity: function WITHDRAWAL_DELAY() constant returns(uint256) +// Solidity: function WITHDRAWAL_DELAY() view returns(uint256) func (_Stakemanager *StakemanagerSession) WITHDRAWALDELAY() (*big.Int, error) { return _Stakemanager.Contract.WITHDRAWALDELAY(&_Stakemanager.CallOpts) } // WITHDRAWALDELAY is a free data retrieval call binding the contract method 0x0ebb172a. // -// Solidity: function WITHDRAWAL_DELAY() constant returns(uint256) +// Solidity: function WITHDRAWAL_DELAY() view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) WITHDRAWALDELAY() (*big.Int, error) { return _Stakemanager.Contract.WITHDRAWALDELAY(&_Stakemanager.CallOpts) } // AccountStateRoot is a free data retrieval call binding the contract method 0x17c2b910. // -// Solidity: function accountStateRoot() constant returns(bytes32) +// Solidity: function accountStateRoot() view returns(bytes32) func (_Stakemanager *StakemanagerCaller) AccountStateRoot(opts *bind.CallOpts) ([32]byte, error) { - var ( - ret0 = new([32]byte) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "accountStateRoot") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "accountStateRoot") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + } // AccountStateRoot is a free data retrieval call binding the contract method 0x17c2b910. // -// Solidity: function accountStateRoot() constant returns(bytes32) +// Solidity: function accountStateRoot() view returns(bytes32) func (_Stakemanager *StakemanagerSession) AccountStateRoot() ([32]byte, error) { return _Stakemanager.Contract.AccountStateRoot(&_Stakemanager.CallOpts) } // AccountStateRoot is a free data retrieval call binding the contract method 0x17c2b910. // -// Solidity: function accountStateRoot() constant returns(bytes32) +// Solidity: function accountStateRoot() view returns(bytes32) func (_Stakemanager *StakemanagerCallerSession) AccountStateRoot() ([32]byte, error) { return _Stakemanager.Contract.AccountStateRoot(&_Stakemanager.CallOpts) } // AuctionPeriod is a free data retrieval call binding the contract method 0x0cccfc58. // -// Solidity: function auctionPeriod() constant returns(uint256) +// Solidity: function auctionPeriod() view returns(uint256) func (_Stakemanager *StakemanagerCaller) AuctionPeriod(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "auctionPeriod") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "auctionPeriod") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // AuctionPeriod is a free data retrieval call binding the contract method 0x0cccfc58. // -// Solidity: function auctionPeriod() constant returns(uint256) +// Solidity: function auctionPeriod() view returns(uint256) func (_Stakemanager *StakemanagerSession) AuctionPeriod() (*big.Int, error) { return _Stakemanager.Contract.AuctionPeriod(&_Stakemanager.CallOpts) } // AuctionPeriod is a free data retrieval call binding the contract method 0x0cccfc58. // -// Solidity: function auctionPeriod() constant returns(uint256) +// Solidity: function auctionPeriod() view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) AuctionPeriod() (*big.Int, error) { return _Stakemanager.Contract.AuctionPeriod(&_Stakemanager.CallOpts) } // CheckPointBlockInterval is a free data retrieval call binding the contract method 0x25316411. // -// Solidity: function checkPointBlockInterval() constant returns(uint256) +// Solidity: function checkPointBlockInterval() view returns(uint256) func (_Stakemanager *StakemanagerCaller) CheckPointBlockInterval(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "checkPointBlockInterval") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "checkPointBlockInterval") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // CheckPointBlockInterval is a free data retrieval call binding the contract method 0x25316411. // -// Solidity: function checkPointBlockInterval() constant returns(uint256) +// Solidity: function checkPointBlockInterval() view returns(uint256) func (_Stakemanager *StakemanagerSession) CheckPointBlockInterval() (*big.Int, error) { return _Stakemanager.Contract.CheckPointBlockInterval(&_Stakemanager.CallOpts) } // CheckPointBlockInterval is a free data retrieval call binding the contract method 0x25316411. // -// Solidity: function checkPointBlockInterval() constant returns(uint256) +// Solidity: function checkPointBlockInterval() view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) CheckPointBlockInterval() (*big.Int, error) { return _Stakemanager.Contract.CheckPointBlockInterval(&_Stakemanager.CallOpts) } // CurrentEpoch is a free data retrieval call binding the contract method 0x76671808. // -// Solidity: function currentEpoch() constant returns(uint256) +// Solidity: function currentEpoch() view returns(uint256) func (_Stakemanager *StakemanagerCaller) CurrentEpoch(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "currentEpoch") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "currentEpoch") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // CurrentEpoch is a free data retrieval call binding the contract method 0x76671808. // -// Solidity: function currentEpoch() constant returns(uint256) +// Solidity: function currentEpoch() view returns(uint256) func (_Stakemanager *StakemanagerSession) CurrentEpoch() (*big.Int, error) { return _Stakemanager.Contract.CurrentEpoch(&_Stakemanager.CallOpts) } // CurrentEpoch is a free data retrieval call binding the contract method 0x76671808. // -// Solidity: function currentEpoch() constant returns(uint256) +// Solidity: function currentEpoch() view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) CurrentEpoch() (*big.Int, error) { return _Stakemanager.Contract.CurrentEpoch(&_Stakemanager.CallOpts) } // CurrentValidatorSetSize is a free data retrieval call binding the contract method 0x7f952d95. // -// Solidity: function currentValidatorSetSize() constant returns(uint256) +// Solidity: function currentValidatorSetSize() view returns(uint256) func (_Stakemanager *StakemanagerCaller) CurrentValidatorSetSize(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "currentValidatorSetSize") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "currentValidatorSetSize") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // CurrentValidatorSetSize is a free data retrieval call binding the contract method 0x7f952d95. // -// Solidity: function currentValidatorSetSize() constant returns(uint256) +// Solidity: function currentValidatorSetSize() view returns(uint256) func (_Stakemanager *StakemanagerSession) CurrentValidatorSetSize() (*big.Int, error) { return _Stakemanager.Contract.CurrentValidatorSetSize(&_Stakemanager.CallOpts) } // CurrentValidatorSetSize is a free data retrieval call binding the contract method 0x7f952d95. // -// Solidity: function currentValidatorSetSize() constant returns(uint256) +// Solidity: function currentValidatorSetSize() view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) CurrentValidatorSetSize() (*big.Int, error) { return _Stakemanager.Contract.CurrentValidatorSetSize(&_Stakemanager.CallOpts) } // CurrentValidatorSetTotalStake is a free data retrieval call binding the contract method 0xa4769071. // -// Solidity: function currentValidatorSetTotalStake() constant returns(uint256) +// Solidity: function currentValidatorSetTotalStake() view returns(uint256) func (_Stakemanager *StakemanagerCaller) CurrentValidatorSetTotalStake(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "currentValidatorSetTotalStake") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "currentValidatorSetTotalStake") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // CurrentValidatorSetTotalStake is a free data retrieval call binding the contract method 0xa4769071. // -// Solidity: function currentValidatorSetTotalStake() constant returns(uint256) +// Solidity: function currentValidatorSetTotalStake() view returns(uint256) func (_Stakemanager *StakemanagerSession) CurrentValidatorSetTotalStake() (*big.Int, error) { return _Stakemanager.Contract.CurrentValidatorSetTotalStake(&_Stakemanager.CallOpts) } // CurrentValidatorSetTotalStake is a free data retrieval call binding the contract method 0xa4769071. // -// Solidity: function currentValidatorSetTotalStake() constant returns(uint256) +// Solidity: function currentValidatorSetTotalStake() view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) CurrentValidatorSetTotalStake() (*big.Int, error) { return _Stakemanager.Contract.CurrentValidatorSetTotalStake(&_Stakemanager.CallOpts) } // DelegationEnabled is a free data retrieval call binding the contract method 0x54b8c601. // -// Solidity: function delegationEnabled() constant returns(bool) +// Solidity: function delegationEnabled() view returns(bool) func (_Stakemanager *StakemanagerCaller) DelegationEnabled(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "delegationEnabled") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "delegationEnabled") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + } // DelegationEnabled is a free data retrieval call binding the contract method 0x54b8c601. // -// Solidity: function delegationEnabled() constant returns(bool) +// Solidity: function delegationEnabled() view returns(bool) func (_Stakemanager *StakemanagerSession) DelegationEnabled() (bool, error) { return _Stakemanager.Contract.DelegationEnabled(&_Stakemanager.CallOpts) } // DelegationEnabled is a free data retrieval call binding the contract method 0x54b8c601. // -// Solidity: function delegationEnabled() constant returns(bool) +// Solidity: function delegationEnabled() view returns(bool) func (_Stakemanager *StakemanagerCallerSession) DelegationEnabled() (bool, error) { return _Stakemanager.Contract.DelegationEnabled(&_Stakemanager.CallOpts) } // Dynasty is a free data retrieval call binding the contract method 0x7060054d. // -// Solidity: function dynasty() constant returns(uint256) +// Solidity: function dynasty() view returns(uint256) func (_Stakemanager *StakemanagerCaller) Dynasty(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "dynasty") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "dynasty") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // Dynasty is a free data retrieval call binding the contract method 0x7060054d. // -// Solidity: function dynasty() constant returns(uint256) +// Solidity: function dynasty() view returns(uint256) func (_Stakemanager *StakemanagerSession) Dynasty() (*big.Int, error) { return _Stakemanager.Contract.Dynasty(&_Stakemanager.CallOpts) } // Dynasty is a free data retrieval call binding the contract method 0x7060054d. // -// Solidity: function dynasty() constant returns(uint256) +// Solidity: function dynasty() view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) Dynasty() (*big.Int, error) { return _Stakemanager.Contract.Dynasty(&_Stakemanager.CallOpts) } // Epoch is a free data retrieval call binding the contract method 0x900cf0cf. // -// Solidity: function epoch() constant returns(uint256) +// Solidity: function epoch() view returns(uint256) func (_Stakemanager *StakemanagerCaller) Epoch(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "epoch") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "epoch") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // Epoch is a free data retrieval call binding the contract method 0x900cf0cf. // -// Solidity: function epoch() constant returns(uint256) +// Solidity: function epoch() view returns(uint256) func (_Stakemanager *StakemanagerSession) Epoch() (*big.Int, error) { return _Stakemanager.Contract.Epoch(&_Stakemanager.CallOpts) } // Epoch is a free data retrieval call binding the contract method 0x900cf0cf. // -// Solidity: function epoch() constant returns(uint256) +// Solidity: function epoch() view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) Epoch() (*big.Int, error) { return _Stakemanager.Contract.Epoch(&_Stakemanager.CallOpts) } // Factory is a free data retrieval call binding the contract method 0xc45a0155. // -// Solidity: function factory() constant returns(address) +// Solidity: function factory() view returns(address) func (_Stakemanager *StakemanagerCaller) Factory(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "factory") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "factory") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // Factory is a free data retrieval call binding the contract method 0xc45a0155. // -// Solidity: function factory() constant returns(address) +// Solidity: function factory() view returns(address) func (_Stakemanager *StakemanagerSession) Factory() (common.Address, error) { return _Stakemanager.Contract.Factory(&_Stakemanager.CallOpts) } // Factory is a free data retrieval call binding the contract method 0xc45a0155. // -// Solidity: function factory() constant returns(address) +// Solidity: function factory() view returns(address) func (_Stakemanager *StakemanagerCallerSession) Factory() (common.Address, error) { return _Stakemanager.Contract.Factory(&_Stakemanager.CallOpts) } // GetCurrentValidatorSet is a free data retrieval call binding the contract method 0x0209fdd0. // -// Solidity: function getCurrentValidatorSet() constant returns(uint256[]) +// Solidity: function getCurrentValidatorSet() view returns(uint256[]) func (_Stakemanager *StakemanagerCaller) GetCurrentValidatorSet(opts *bind.CallOpts) ([]*big.Int, error) { - var ( - ret0 = new([]*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "getCurrentValidatorSet") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "getCurrentValidatorSet") + + if err != nil { + return *new([]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + + return out0, err + } // GetCurrentValidatorSet is a free data retrieval call binding the contract method 0x0209fdd0. // -// Solidity: function getCurrentValidatorSet() constant returns(uint256[]) +// Solidity: function getCurrentValidatorSet() view returns(uint256[]) func (_Stakemanager *StakemanagerSession) GetCurrentValidatorSet() ([]*big.Int, error) { return _Stakemanager.Contract.GetCurrentValidatorSet(&_Stakemanager.CallOpts) } // GetCurrentValidatorSet is a free data retrieval call binding the contract method 0x0209fdd0. // -// Solidity: function getCurrentValidatorSet() constant returns(uint256[]) +// Solidity: function getCurrentValidatorSet() view returns(uint256[]) func (_Stakemanager *StakemanagerCallerSession) GetCurrentValidatorSet() ([]*big.Int, error) { return _Stakemanager.Contract.GetCurrentValidatorSet(&_Stakemanager.CallOpts) } // GetValidatorContract is a free data retrieval call binding the contract method 0x56342d8c. // -// Solidity: function getValidatorContract(uint256 validatorId) constant returns(address) +// Solidity: function getValidatorContract(uint256 validatorId) view returns(address) func (_Stakemanager *StakemanagerCaller) GetValidatorContract(opts *bind.CallOpts, validatorId *big.Int) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "getValidatorContract", validatorId) - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "getValidatorContract", validatorId) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // GetValidatorContract is a free data retrieval call binding the contract method 0x56342d8c. // -// Solidity: function getValidatorContract(uint256 validatorId) constant returns(address) +// Solidity: function getValidatorContract(uint256 validatorId) view returns(address) func (_Stakemanager *StakemanagerSession) GetValidatorContract(validatorId *big.Int) (common.Address, error) { return _Stakemanager.Contract.GetValidatorContract(&_Stakemanager.CallOpts, validatorId) } // GetValidatorContract is a free data retrieval call binding the contract method 0x56342d8c. // -// Solidity: function getValidatorContract(uint256 validatorId) constant returns(address) +// Solidity: function getValidatorContract(uint256 validatorId) view returns(address) func (_Stakemanager *StakemanagerCallerSession) GetValidatorContract(validatorId *big.Int) (common.Address, error) { return _Stakemanager.Contract.GetValidatorContract(&_Stakemanager.CallOpts, validatorId) } // GetValidatorId is a free data retrieval call binding the contract method 0x174e6832. // -// Solidity: function getValidatorId(address user) constant returns(uint256) +// Solidity: function getValidatorId(address user) view returns(uint256) func (_Stakemanager *StakemanagerCaller) GetValidatorId(opts *bind.CallOpts, user common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "getValidatorId", user) - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "getValidatorId", user) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // GetValidatorId is a free data retrieval call binding the contract method 0x174e6832. // -// Solidity: function getValidatorId(address user) constant returns(uint256) +// Solidity: function getValidatorId(address user) view returns(uint256) func (_Stakemanager *StakemanagerSession) GetValidatorId(user common.Address) (*big.Int, error) { return _Stakemanager.Contract.GetValidatorId(&_Stakemanager.CallOpts, user) } // GetValidatorId is a free data retrieval call binding the contract method 0x174e6832. // -// Solidity: function getValidatorId(address user) constant returns(uint256) +// Solidity: function getValidatorId(address user) view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) GetValidatorId(user common.Address) (*big.Int, error) { return _Stakemanager.Contract.GetValidatorId(&_Stakemanager.CallOpts, user) } // Governance is a free data retrieval call binding the contract method 0x5aa6e675. // -// Solidity: function governance() constant returns(address) +// Solidity: function governance() view returns(address) func (_Stakemanager *StakemanagerCaller) Governance(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "governance") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "governance") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // Governance is a free data retrieval call binding the contract method 0x5aa6e675. // -// Solidity: function governance() constant returns(address) +// Solidity: function governance() view returns(address) func (_Stakemanager *StakemanagerSession) Governance() (common.Address, error) { return _Stakemanager.Contract.Governance(&_Stakemanager.CallOpts) } // Governance is a free data retrieval call binding the contract method 0x5aa6e675. // -// Solidity: function governance() constant returns(address) +// Solidity: function governance() view returns(address) func (_Stakemanager *StakemanagerCallerSession) Governance() (common.Address, error) { return _Stakemanager.Contract.Governance(&_Stakemanager.CallOpts) } // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. // -// Solidity: function isOwner() constant returns(bool) +// Solidity: function isOwner() view returns(bool) func (_Stakemanager *StakemanagerCaller) IsOwner(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "isOwner") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "isOwner") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + } // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. // -// Solidity: function isOwner() constant returns(bool) +// Solidity: function isOwner() view returns(bool) func (_Stakemanager *StakemanagerSession) IsOwner() (bool, error) { return _Stakemanager.Contract.IsOwner(&_Stakemanager.CallOpts) } // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. // -// Solidity: function isOwner() constant returns(bool) +// Solidity: function isOwner() view returns(bool) func (_Stakemanager *StakemanagerCallerSession) IsOwner() (bool, error) { return _Stakemanager.Contract.IsOwner(&_Stakemanager.CallOpts) } // IsValidator is a free data retrieval call binding the contract method 0x2649263a. // -// Solidity: function isValidator(uint256 validatorId) constant returns(bool) +// Solidity: function isValidator(uint256 validatorId) view returns(bool) func (_Stakemanager *StakemanagerCaller) IsValidator(opts *bind.CallOpts, validatorId *big.Int) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "isValidator", validatorId) - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "isValidator", validatorId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + } // IsValidator is a free data retrieval call binding the contract method 0x2649263a. // -// Solidity: function isValidator(uint256 validatorId) constant returns(bool) +// Solidity: function isValidator(uint256 validatorId) view returns(bool) func (_Stakemanager *StakemanagerSession) IsValidator(validatorId *big.Int) (bool, error) { return _Stakemanager.Contract.IsValidator(&_Stakemanager.CallOpts, validatorId) } // IsValidator is a free data retrieval call binding the contract method 0x2649263a. // -// Solidity: function isValidator(uint256 validatorId) constant returns(bool) +// Solidity: function isValidator(uint256 validatorId) view returns(bool) func (_Stakemanager *StakemanagerCallerSession) IsValidator(validatorId *big.Int) (bool, error) { return _Stakemanager.Contract.IsValidator(&_Stakemanager.CallOpts, validatorId) } // LatestSignerUpdateEpoch is a free data retrieval call binding the contract method 0xd7f5549d. // -// Solidity: function latestSignerUpdateEpoch(uint256 ) constant returns(uint256) +// Solidity: function latestSignerUpdateEpoch(uint256 ) view returns(uint256) func (_Stakemanager *StakemanagerCaller) LatestSignerUpdateEpoch(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "latestSignerUpdateEpoch", arg0) - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "latestSignerUpdateEpoch", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // LatestSignerUpdateEpoch is a free data retrieval call binding the contract method 0xd7f5549d. // -// Solidity: function latestSignerUpdateEpoch(uint256 ) constant returns(uint256) +// Solidity: function latestSignerUpdateEpoch(uint256 ) view returns(uint256) func (_Stakemanager *StakemanagerSession) LatestSignerUpdateEpoch(arg0 *big.Int) (*big.Int, error) { return _Stakemanager.Contract.LatestSignerUpdateEpoch(&_Stakemanager.CallOpts, arg0) } // LatestSignerUpdateEpoch is a free data retrieval call binding the contract method 0xd7f5549d. // -// Solidity: function latestSignerUpdateEpoch(uint256 ) constant returns(uint256) +// Solidity: function latestSignerUpdateEpoch(uint256 ) view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) LatestSignerUpdateEpoch(arg0 *big.Int) (*big.Int, error) { return _Stakemanager.Contract.LatestSignerUpdateEpoch(&_Stakemanager.CallOpts, arg0) } // Locked is a free data retrieval call binding the contract method 0xcf309012. // -// Solidity: function locked() constant returns(bool) +// Solidity: function locked() view returns(bool) func (_Stakemanager *StakemanagerCaller) Locked(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "locked") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "locked") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + } // Locked is a free data retrieval call binding the contract method 0xcf309012. // -// Solidity: function locked() constant returns(bool) +// Solidity: function locked() view returns(bool) func (_Stakemanager *StakemanagerSession) Locked() (bool, error) { return _Stakemanager.Contract.Locked(&_Stakemanager.CallOpts) } // Locked is a free data retrieval call binding the contract method 0xcf309012. // -// Solidity: function locked() constant returns(bool) +// Solidity: function locked() view returns(bool) func (_Stakemanager *StakemanagerCallerSession) Locked() (bool, error) { return _Stakemanager.Contract.Locked(&_Stakemanager.CallOpts) } // Logger is a free data retrieval call binding the contract method 0xf24ccbfe. // -// Solidity: function logger() constant returns(address) +// Solidity: function logger() view returns(address) func (_Stakemanager *StakemanagerCaller) Logger(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "logger") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "logger") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // Logger is a free data retrieval call binding the contract method 0xf24ccbfe. // -// Solidity: function logger() constant returns(address) +// Solidity: function logger() view returns(address) func (_Stakemanager *StakemanagerSession) Logger() (common.Address, error) { return _Stakemanager.Contract.Logger(&_Stakemanager.CallOpts) } // Logger is a free data retrieval call binding the contract method 0xf24ccbfe. // -// Solidity: function logger() constant returns(address) +// Solidity: function logger() view returns(address) func (_Stakemanager *StakemanagerCallerSession) Logger() (common.Address, error) { return _Stakemanager.Contract.Logger(&_Stakemanager.CallOpts) } // MinDeposit is a free data retrieval call binding the contract method 0x41b3d185. // -// Solidity: function minDeposit() constant returns(uint256) +// Solidity: function minDeposit() view returns(uint256) func (_Stakemanager *StakemanagerCaller) MinDeposit(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "minDeposit") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "minDeposit") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // MinDeposit is a free data retrieval call binding the contract method 0x41b3d185. // -// Solidity: function minDeposit() constant returns(uint256) +// Solidity: function minDeposit() view returns(uint256) func (_Stakemanager *StakemanagerSession) MinDeposit() (*big.Int, error) { return _Stakemanager.Contract.MinDeposit(&_Stakemanager.CallOpts) } // MinDeposit is a free data retrieval call binding the contract method 0x41b3d185. // -// Solidity: function minDeposit() constant returns(uint256) +// Solidity: function minDeposit() view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) MinDeposit() (*big.Int, error) { return _Stakemanager.Contract.MinDeposit(&_Stakemanager.CallOpts) } // MinHeimdallFee is a free data retrieval call binding the contract method 0xfba58f34. // -// Solidity: function minHeimdallFee() constant returns(uint256) +// Solidity: function minHeimdallFee() view returns(uint256) func (_Stakemanager *StakemanagerCaller) MinHeimdallFee(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "minHeimdallFee") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "minHeimdallFee") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // MinHeimdallFee is a free data retrieval call binding the contract method 0xfba58f34. // -// Solidity: function minHeimdallFee() constant returns(uint256) +// Solidity: function minHeimdallFee() view returns(uint256) func (_Stakemanager *StakemanagerSession) MinHeimdallFee() (*big.Int, error) { return _Stakemanager.Contract.MinHeimdallFee(&_Stakemanager.CallOpts) } // MinHeimdallFee is a free data retrieval call binding the contract method 0xfba58f34. // -// Solidity: function minHeimdallFee() constant returns(uint256) +// Solidity: function minHeimdallFee() view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) MinHeimdallFee() (*big.Int, error) { return _Stakemanager.Contract.MinHeimdallFee(&_Stakemanager.CallOpts) } // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function owner() constant returns(address) +// Solidity: function owner() view returns(address) func (_Stakemanager *StakemanagerCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "owner") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function owner() constant returns(address) +// Solidity: function owner() view returns(address) func (_Stakemanager *StakemanagerSession) Owner() (common.Address, error) { return _Stakemanager.Contract.Owner(&_Stakemanager.CallOpts) } // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function owner() constant returns(address) +// Solidity: function owner() view returns(address) func (_Stakemanager *StakemanagerCallerSession) Owner() (common.Address, error) { return _Stakemanager.Contract.Owner(&_Stakemanager.CallOpts) } // OwnerOf is a free data retrieval call binding the contract method 0x6352211e. // -// Solidity: function ownerOf(uint256 tokenId) constant returns(address) +// Solidity: function ownerOf(uint256 tokenId) view returns(address) func (_Stakemanager *StakemanagerCaller) OwnerOf(opts *bind.CallOpts, tokenId *big.Int) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "ownerOf", tokenId) - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "ownerOf", tokenId) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // OwnerOf is a free data retrieval call binding the contract method 0x6352211e. // -// Solidity: function ownerOf(uint256 tokenId) constant returns(address) +// Solidity: function ownerOf(uint256 tokenId) view returns(address) func (_Stakemanager *StakemanagerSession) OwnerOf(tokenId *big.Int) (common.Address, error) { return _Stakemanager.Contract.OwnerOf(&_Stakemanager.CallOpts, tokenId) } // OwnerOf is a free data retrieval call binding the contract method 0x6352211e. // -// Solidity: function ownerOf(uint256 tokenId) constant returns(address) +// Solidity: function ownerOf(uint256 tokenId) view returns(address) func (_Stakemanager *StakemanagerCallerSession) OwnerOf(tokenId *big.Int) (common.Address, error) { return _Stakemanager.Contract.OwnerOf(&_Stakemanager.CallOpts, tokenId) } // ProposerBonus is a free data retrieval call binding the contract method 0x34274586. // -// Solidity: function proposerBonus() constant returns(uint256) +// Solidity: function proposerBonus() view returns(uint256) func (_Stakemanager *StakemanagerCaller) ProposerBonus(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "proposerBonus") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "proposerBonus") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // ProposerBonus is a free data retrieval call binding the contract method 0x34274586. // -// Solidity: function proposerBonus() constant returns(uint256) +// Solidity: function proposerBonus() view returns(uint256) func (_Stakemanager *StakemanagerSession) ProposerBonus() (*big.Int, error) { return _Stakemanager.Contract.ProposerBonus(&_Stakemanager.CallOpts) } // ProposerBonus is a free data retrieval call binding the contract method 0x34274586. // -// Solidity: function proposerBonus() constant returns(uint256) +// Solidity: function proposerBonus() view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) ProposerBonus() (*big.Int, error) { return _Stakemanager.Contract.ProposerBonus(&_Stakemanager.CallOpts) } // PubToAddress is a free data retrieval call binding the contract method 0xd0110274. // -// Solidity: function pubToAddress(bytes pub) constant returns(address) +// Solidity: function pubToAddress(bytes pub) pure returns(address) func (_Stakemanager *StakemanagerCaller) PubToAddress(opts *bind.CallOpts, pub []byte) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "pubToAddress", pub) - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "pubToAddress", pub) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // PubToAddress is a free data retrieval call binding the contract method 0xd0110274. // -// Solidity: function pubToAddress(bytes pub) constant returns(address) +// Solidity: function pubToAddress(bytes pub) pure returns(address) func (_Stakemanager *StakemanagerSession) PubToAddress(pub []byte) (common.Address, error) { return _Stakemanager.Contract.PubToAddress(&_Stakemanager.CallOpts, pub) } // PubToAddress is a free data retrieval call binding the contract method 0xd0110274. // -// Solidity: function pubToAddress(bytes pub) constant returns(address) +// Solidity: function pubToAddress(bytes pub) pure returns(address) func (_Stakemanager *StakemanagerCallerSession) PubToAddress(pub []byte) (common.Address, error) { return _Stakemanager.Contract.PubToAddress(&_Stakemanager.CallOpts, pub) } // Registry is a free data retrieval call binding the contract method 0x7b103999. // -// Solidity: function registry() constant returns(address) +// Solidity: function registry() view returns(address) func (_Stakemanager *StakemanagerCaller) Registry(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "registry") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "registry") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // Registry is a free data retrieval call binding the contract method 0x7b103999. // -// Solidity: function registry() constant returns(address) +// Solidity: function registry() view returns(address) func (_Stakemanager *StakemanagerSession) Registry() (common.Address, error) { return _Stakemanager.Contract.Registry(&_Stakemanager.CallOpts) } // Registry is a free data retrieval call binding the contract method 0x7b103999. // -// Solidity: function registry() constant returns(address) +// Solidity: function registry() view returns(address) func (_Stakemanager *StakemanagerCallerSession) Registry() (common.Address, error) { return _Stakemanager.Contract.Registry(&_Stakemanager.CallOpts) } // ReplacementCoolDown is a free data retrieval call binding the contract method 0x77939d10. // -// Solidity: function replacementCoolDown() constant returns(uint256) +// Solidity: function replacementCoolDown() view returns(uint256) func (_Stakemanager *StakemanagerCaller) ReplacementCoolDown(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "replacementCoolDown") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "replacementCoolDown") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // ReplacementCoolDown is a free data retrieval call binding the contract method 0x77939d10. // -// Solidity: function replacementCoolDown() constant returns(uint256) +// Solidity: function replacementCoolDown() view returns(uint256) func (_Stakemanager *StakemanagerSession) ReplacementCoolDown() (*big.Int, error) { return _Stakemanager.Contract.ReplacementCoolDown(&_Stakemanager.CallOpts) } // ReplacementCoolDown is a free data retrieval call binding the contract method 0x77939d10. // -// Solidity: function replacementCoolDown() constant returns(uint256) +// Solidity: function replacementCoolDown() view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) ReplacementCoolDown() (*big.Int, error) { return _Stakemanager.Contract.ReplacementCoolDown(&_Stakemanager.CallOpts) } // RootChain is a free data retrieval call binding the contract method 0x987ab9db. // -// Solidity: function rootChain() constant returns(address) +// Solidity: function rootChain() view returns(address) func (_Stakemanager *StakemanagerCaller) RootChain(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "rootChain") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "rootChain") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // RootChain is a free data retrieval call binding the contract method 0x987ab9db. // -// Solidity: function rootChain() constant returns(address) +// Solidity: function rootChain() view returns(address) func (_Stakemanager *StakemanagerSession) RootChain() (common.Address, error) { return _Stakemanager.Contract.RootChain(&_Stakemanager.CallOpts) } // RootChain is a free data retrieval call binding the contract method 0x987ab9db. // -// Solidity: function rootChain() constant returns(address) +// Solidity: function rootChain() view returns(address) func (_Stakemanager *StakemanagerCallerSession) RootChain() (common.Address, error) { return _Stakemanager.Contract.RootChain(&_Stakemanager.CallOpts) } // SignerToValidator is a free data retrieval call binding the contract method 0x3862da0b. // -// Solidity: function signerToValidator(address ) constant returns(uint256) +// Solidity: function signerToValidator(address ) view returns(uint256) func (_Stakemanager *StakemanagerCaller) SignerToValidator(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "signerToValidator", arg0) - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "signerToValidator", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // SignerToValidator is a free data retrieval call binding the contract method 0x3862da0b. // -// Solidity: function signerToValidator(address ) constant returns(uint256) +// Solidity: function signerToValidator(address ) view returns(uint256) func (_Stakemanager *StakemanagerSession) SignerToValidator(arg0 common.Address) (*big.Int, error) { return _Stakemanager.Contract.SignerToValidator(&_Stakemanager.CallOpts, arg0) } // SignerToValidator is a free data retrieval call binding the contract method 0x3862da0b. // -// Solidity: function signerToValidator(address ) constant returns(uint256) +// Solidity: function signerToValidator(address ) view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) SignerToValidator(arg0 common.Address) (*big.Int, error) { return _Stakemanager.Contract.SignerToValidator(&_Stakemanager.CallOpts, arg0) } // SignerUpdateLimit is a free data retrieval call binding the contract method 0x4e3c83f1. // -// Solidity: function signerUpdateLimit() constant returns(uint256) +// Solidity: function signerUpdateLimit() view returns(uint256) func (_Stakemanager *StakemanagerCaller) SignerUpdateLimit(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "signerUpdateLimit") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "signerUpdateLimit") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // SignerUpdateLimit is a free data retrieval call binding the contract method 0x4e3c83f1. // -// Solidity: function signerUpdateLimit() constant returns(uint256) +// Solidity: function signerUpdateLimit() view returns(uint256) func (_Stakemanager *StakemanagerSession) SignerUpdateLimit() (*big.Int, error) { return _Stakemanager.Contract.SignerUpdateLimit(&_Stakemanager.CallOpts) } // SignerUpdateLimit is a free data retrieval call binding the contract method 0x4e3c83f1. // -// Solidity: function signerUpdateLimit() constant returns(uint256) +// Solidity: function signerUpdateLimit() view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) SignerUpdateLimit() (*big.Int, error) { return _Stakemanager.Contract.SignerUpdateLimit(&_Stakemanager.CallOpts) } // SupportsHistory is a free data retrieval call binding the contract method 0x7033e4a6. // -// Solidity: function supportsHistory() constant returns(bool) +// Solidity: function supportsHistory() pure returns(bool) func (_Stakemanager *StakemanagerCaller) SupportsHistory(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "supportsHistory") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "supportsHistory") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + } // SupportsHistory is a free data retrieval call binding the contract method 0x7033e4a6. // -// Solidity: function supportsHistory() constant returns(bool) +// Solidity: function supportsHistory() pure returns(bool) func (_Stakemanager *StakemanagerSession) SupportsHistory() (bool, error) { return _Stakemanager.Contract.SupportsHistory(&_Stakemanager.CallOpts) } // SupportsHistory is a free data retrieval call binding the contract method 0x7033e4a6. // -// Solidity: function supportsHistory() constant returns(bool) +// Solidity: function supportsHistory() pure returns(bool) func (_Stakemanager *StakemanagerCallerSession) SupportsHistory() (bool, error) { return _Stakemanager.Contract.SupportsHistory(&_Stakemanager.CallOpts) } // Token is a free data retrieval call binding the contract method 0xfc0c546a. // -// Solidity: function token() constant returns(address) +// Solidity: function token() view returns(address) func (_Stakemanager *StakemanagerCaller) Token(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "token") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "token") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // Token is a free data retrieval call binding the contract method 0xfc0c546a. // -// Solidity: function token() constant returns(address) +// Solidity: function token() view returns(address) func (_Stakemanager *StakemanagerSession) Token() (common.Address, error) { return _Stakemanager.Contract.Token(&_Stakemanager.CallOpts) } // Token is a free data retrieval call binding the contract method 0xfc0c546a. // -// Solidity: function token() constant returns(address) +// Solidity: function token() view returns(address) func (_Stakemanager *StakemanagerCallerSession) Token() (common.Address, error) { return _Stakemanager.Contract.Token(&_Stakemanager.CallOpts) } // TotalHeimdallFee is a free data retrieval call binding the contract method 0x9a8a6243. // -// Solidity: function totalHeimdallFee() constant returns(uint256) +// Solidity: function totalHeimdallFee() view returns(uint256) func (_Stakemanager *StakemanagerCaller) TotalHeimdallFee(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "totalHeimdallFee") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "totalHeimdallFee") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // TotalHeimdallFee is a free data retrieval call binding the contract method 0x9a8a6243. // -// Solidity: function totalHeimdallFee() constant returns(uint256) +// Solidity: function totalHeimdallFee() view returns(uint256) func (_Stakemanager *StakemanagerSession) TotalHeimdallFee() (*big.Int, error) { return _Stakemanager.Contract.TotalHeimdallFee(&_Stakemanager.CallOpts) } // TotalHeimdallFee is a free data retrieval call binding the contract method 0x9a8a6243. // -// Solidity: function totalHeimdallFee() constant returns(uint256) +// Solidity: function totalHeimdallFee() view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) TotalHeimdallFee() (*big.Int, error) { return _Stakemanager.Contract.TotalHeimdallFee(&_Stakemanager.CallOpts) } // TotalRewards is a free data retrieval call binding the contract method 0x0e15561a. // -// Solidity: function totalRewards() constant returns(uint256) +// Solidity: function totalRewards() view returns(uint256) func (_Stakemanager *StakemanagerCaller) TotalRewards(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "totalRewards") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "totalRewards") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // TotalRewards is a free data retrieval call binding the contract method 0x0e15561a. // -// Solidity: function totalRewards() constant returns(uint256) +// Solidity: function totalRewards() view returns(uint256) func (_Stakemanager *StakemanagerSession) TotalRewards() (*big.Int, error) { return _Stakemanager.Contract.TotalRewards(&_Stakemanager.CallOpts) } // TotalRewards is a free data retrieval call binding the contract method 0x0e15561a. // -// Solidity: function totalRewards() constant returns(uint256) +// Solidity: function totalRewards() view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) TotalRewards() (*big.Int, error) { return _Stakemanager.Contract.TotalRewards(&_Stakemanager.CallOpts) } // TotalRewardsLiquidated is a free data retrieval call binding the contract method 0xcd6b8388. // -// Solidity: function totalRewardsLiquidated() constant returns(uint256) +// Solidity: function totalRewardsLiquidated() view returns(uint256) func (_Stakemanager *StakemanagerCaller) TotalRewardsLiquidated(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "totalRewardsLiquidated") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "totalRewardsLiquidated") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // TotalRewardsLiquidated is a free data retrieval call binding the contract method 0xcd6b8388. // -// Solidity: function totalRewardsLiquidated() constant returns(uint256) +// Solidity: function totalRewardsLiquidated() view returns(uint256) func (_Stakemanager *StakemanagerSession) TotalRewardsLiquidated() (*big.Int, error) { return _Stakemanager.Contract.TotalRewardsLiquidated(&_Stakemanager.CallOpts) } // TotalRewardsLiquidated is a free data retrieval call binding the contract method 0xcd6b8388. // -// Solidity: function totalRewardsLiquidated() constant returns(uint256) +// Solidity: function totalRewardsLiquidated() view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) TotalRewardsLiquidated() (*big.Int, error) { return _Stakemanager.Contract.TotalRewardsLiquidated(&_Stakemanager.CallOpts) } // TotalStaked is a free data retrieval call binding the contract method 0x817b1cd2. // -// Solidity: function totalStaked() constant returns(uint256) +// Solidity: function totalStaked() view returns(uint256) func (_Stakemanager *StakemanagerCaller) TotalStaked(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "totalStaked") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "totalStaked") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // TotalStaked is a free data retrieval call binding the contract method 0x817b1cd2. // -// Solidity: function totalStaked() constant returns(uint256) +// Solidity: function totalStaked() view returns(uint256) func (_Stakemanager *StakemanagerSession) TotalStaked() (*big.Int, error) { return _Stakemanager.Contract.TotalStaked(&_Stakemanager.CallOpts) } // TotalStaked is a free data retrieval call binding the contract method 0x817b1cd2. // -// Solidity: function totalStaked() constant returns(uint256) +// Solidity: function totalStaked() view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) TotalStaked() (*big.Int, error) { return _Stakemanager.Contract.TotalStaked(&_Stakemanager.CallOpts) } // TotalStakedFor is a free data retrieval call binding the contract method 0x4b341aed. // -// Solidity: function totalStakedFor(address user) constant returns(uint256) +// Solidity: function totalStakedFor(address user) view returns(uint256) func (_Stakemanager *StakemanagerCaller) TotalStakedFor(opts *bind.CallOpts, user common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "totalStakedFor", user) - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "totalStakedFor", user) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // TotalStakedFor is a free data retrieval call binding the contract method 0x4b341aed. // -// Solidity: function totalStakedFor(address user) constant returns(uint256) +// Solidity: function totalStakedFor(address user) view returns(uint256) func (_Stakemanager *StakemanagerSession) TotalStakedFor(user common.Address) (*big.Int, error) { return _Stakemanager.Contract.TotalStakedFor(&_Stakemanager.CallOpts, user) } // TotalStakedFor is a free data retrieval call binding the contract method 0x4b341aed. // -// Solidity: function totalStakedFor(address user) constant returns(uint256) +// Solidity: function totalStakedFor(address user) view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) TotalStakedFor(user common.Address) (*big.Int, error) { return _Stakemanager.Contract.TotalStakedFor(&_Stakemanager.CallOpts, user) } // UserFeeExit is a free data retrieval call binding the contract method 0x78f84a44. // -// Solidity: function userFeeExit(address ) constant returns(uint256) +// Solidity: function userFeeExit(address ) view returns(uint256) func (_Stakemanager *StakemanagerCaller) UserFeeExit(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "userFeeExit", arg0) - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "userFeeExit", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // UserFeeExit is a free data retrieval call binding the contract method 0x78f84a44. // -// Solidity: function userFeeExit(address ) constant returns(uint256) +// Solidity: function userFeeExit(address ) view returns(uint256) func (_Stakemanager *StakemanagerSession) UserFeeExit(arg0 common.Address) (*big.Int, error) { return _Stakemanager.Contract.UserFeeExit(&_Stakemanager.CallOpts, arg0) } // UserFeeExit is a free data retrieval call binding the contract method 0x78f84a44. // -// Solidity: function userFeeExit(address ) constant returns(uint256) +// Solidity: function userFeeExit(address ) view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) UserFeeExit(arg0 common.Address) (*big.Int, error) { return _Stakemanager.Contract.UserFeeExit(&_Stakemanager.CallOpts, arg0) } // ValidatorAuction is a free data retrieval call binding the contract method 0x5325e144. // -// Solidity: function validatorAuction(uint256 ) constant returns(uint256 amount, uint256 startEpoch, address user) +// Solidity: function validatorAuction(uint256 ) view returns(uint256 amount, uint256 startEpoch, address user) func (_Stakemanager *StakemanagerCaller) ValidatorAuction(opts *bind.CallOpts, arg0 *big.Int) (struct { Amount *big.Int StartEpoch *big.Int User common.Address }, error) { - ret := new(struct { + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "validatorAuction", arg0) + + outstruct := new(struct { Amount *big.Int StartEpoch *big.Int User common.Address }) - out := ret - err := _Stakemanager.contract.Call(opts, out, "validatorAuction", arg0) - return *ret, err + if err != nil { + return *outstruct, err + } + + outstruct.Amount = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.StartEpoch = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.User = *abi.ConvertType(out[2], new(common.Address)).(*common.Address) + + return *outstruct, err + } // ValidatorAuction is a free data retrieval call binding the contract method 0x5325e144. // -// Solidity: function validatorAuction(uint256 ) constant returns(uint256 amount, uint256 startEpoch, address user) +// Solidity: function validatorAuction(uint256 ) view returns(uint256 amount, uint256 startEpoch, address user) func (_Stakemanager *StakemanagerSession) ValidatorAuction(arg0 *big.Int) (struct { Amount *big.Int StartEpoch *big.Int @@ -1295,7 +1522,7 @@ func (_Stakemanager *StakemanagerSession) ValidatorAuction(arg0 *big.Int) (struc // ValidatorAuction is a free data retrieval call binding the contract method 0x5325e144. // -// Solidity: function validatorAuction(uint256 ) constant returns(uint256 amount, uint256 startEpoch, address user) +// Solidity: function validatorAuction(uint256 ) view returns(uint256 amount, uint256 startEpoch, address user) func (_Stakemanager *StakemanagerCallerSession) ValidatorAuction(arg0 *big.Int) (struct { Amount *big.Int StartEpoch *big.Int @@ -1306,49 +1533,63 @@ func (_Stakemanager *StakemanagerCallerSession) ValidatorAuction(arg0 *big.Int) // ValidatorStake is a free data retrieval call binding the contract method 0xeceec1d3. // -// Solidity: function validatorStake(uint256 validatorId) constant returns(uint256) +// Solidity: function validatorStake(uint256 validatorId) view returns(uint256) func (_Stakemanager *StakemanagerCaller) ValidatorStake(opts *bind.CallOpts, validatorId *big.Int) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "validatorStake", validatorId) - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "validatorStake", validatorId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // ValidatorStake is a free data retrieval call binding the contract method 0xeceec1d3. // -// Solidity: function validatorStake(uint256 validatorId) constant returns(uint256) +// Solidity: function validatorStake(uint256 validatorId) view returns(uint256) func (_Stakemanager *StakemanagerSession) ValidatorStake(validatorId *big.Int) (*big.Int, error) { return _Stakemanager.Contract.ValidatorStake(&_Stakemanager.CallOpts, validatorId) } // ValidatorStake is a free data retrieval call binding the contract method 0xeceec1d3. // -// Solidity: function validatorStake(uint256 validatorId) constant returns(uint256) +// Solidity: function validatorStake(uint256 validatorId) view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) ValidatorStake(validatorId *big.Int) (*big.Int, error) { return _Stakemanager.Contract.ValidatorStake(&_Stakemanager.CallOpts, validatorId) } // ValidatorState is a free data retrieval call binding the contract method 0x5c248855. // -// Solidity: function validatorState(uint256 ) constant returns(int256 amount, int256 stakerCount) +// Solidity: function validatorState(uint256 ) view returns(int256 amount, int256 stakerCount) func (_Stakemanager *StakemanagerCaller) ValidatorState(opts *bind.CallOpts, arg0 *big.Int) (struct { Amount *big.Int StakerCount *big.Int }, error) { - ret := new(struct { + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "validatorState", arg0) + + outstruct := new(struct { Amount *big.Int StakerCount *big.Int }) - out := ret - err := _Stakemanager.contract.Call(opts, out, "validatorState", arg0) - return *ret, err + if err != nil { + return *outstruct, err + } + + outstruct.Amount = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.StakerCount = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + + return *outstruct, err + } // ValidatorState is a free data retrieval call binding the contract method 0x5c248855. // -// Solidity: function validatorState(uint256 ) constant returns(int256 amount, int256 stakerCount) +// Solidity: function validatorState(uint256 ) view returns(int256 amount, int256 stakerCount) func (_Stakemanager *StakemanagerSession) ValidatorState(arg0 *big.Int) (struct { Amount *big.Int StakerCount *big.Int @@ -1358,7 +1599,7 @@ func (_Stakemanager *StakemanagerSession) ValidatorState(arg0 *big.Int) (struct // ValidatorState is a free data retrieval call binding the contract method 0x5c248855. // -// Solidity: function validatorState(uint256 ) constant returns(int256 amount, int256 stakerCount) +// Solidity: function validatorState(uint256 ) view returns(int256 amount, int256 stakerCount) func (_Stakemanager *StakemanagerCallerSession) ValidatorState(arg0 *big.Int) (struct { Amount *big.Int StakerCount *big.Int @@ -1368,33 +1609,38 @@ func (_Stakemanager *StakemanagerCallerSession) ValidatorState(arg0 *big.Int) (s // ValidatorThreshold is a free data retrieval call binding the contract method 0x4fd101d7. // -// Solidity: function validatorThreshold() constant returns(uint256) +// Solidity: function validatorThreshold() view returns(uint256) func (_Stakemanager *StakemanagerCaller) ValidatorThreshold(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "validatorThreshold") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "validatorThreshold") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // ValidatorThreshold is a free data retrieval call binding the contract method 0x4fd101d7. // -// Solidity: function validatorThreshold() constant returns(uint256) +// Solidity: function validatorThreshold() view returns(uint256) func (_Stakemanager *StakemanagerSession) ValidatorThreshold() (*big.Int, error) { return _Stakemanager.Contract.ValidatorThreshold(&_Stakemanager.CallOpts) } // ValidatorThreshold is a free data retrieval call binding the contract method 0x4fd101d7. // -// Solidity: function validatorThreshold() constant returns(uint256) +// Solidity: function validatorThreshold() view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) ValidatorThreshold() (*big.Int, error) { return _Stakemanager.Contract.ValidatorThreshold(&_Stakemanager.CallOpts) } // Validators is a free data retrieval call binding the contract method 0x35aa2e44. // -// Solidity: function validators(uint256 ) constant returns(uint256 amount, uint256 reward, uint256 activationEpoch, uint256 deactivationEpoch, uint256 jailTime, address signer, address contractAddress, uint8 status) +// Solidity: function validators(uint256 ) view returns(uint256 amount, uint256 reward, uint256 activationEpoch, uint256 deactivationEpoch, uint256 jailTime, address signer, address contractAddress, uint8 status) func (_Stakemanager *StakemanagerCaller) Validators(opts *bind.CallOpts, arg0 *big.Int) (struct { Amount *big.Int Reward *big.Int @@ -1405,7 +1651,10 @@ func (_Stakemanager *StakemanagerCaller) Validators(opts *bind.CallOpts, arg0 *b ContractAddress common.Address Status uint8 }, error) { - ret := new(struct { + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "validators", arg0) + + outstruct := new(struct { Amount *big.Int Reward *big.Int ActivationEpoch *big.Int @@ -1415,14 +1664,26 @@ func (_Stakemanager *StakemanagerCaller) Validators(opts *bind.CallOpts, arg0 *b ContractAddress common.Address Status uint8 }) - out := ret - err := _Stakemanager.contract.Call(opts, out, "validators", arg0) - return *ret, err + if err != nil { + return *outstruct, err + } + + outstruct.Amount = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.Reward = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.ActivationEpoch = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.DeactivationEpoch = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.JailTime = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) + outstruct.Signer = *abi.ConvertType(out[5], new(common.Address)).(*common.Address) + outstruct.ContractAddress = *abi.ConvertType(out[6], new(common.Address)).(*common.Address) + outstruct.Status = *abi.ConvertType(out[7], new(uint8)).(*uint8) + + return *outstruct, err + } // Validators is a free data retrieval call binding the contract method 0x35aa2e44. // -// Solidity: function validators(uint256 ) constant returns(uint256 amount, uint256 reward, uint256 activationEpoch, uint256 deactivationEpoch, uint256 jailTime, address signer, address contractAddress, uint8 status) +// Solidity: function validators(uint256 ) view returns(uint256 amount, uint256 reward, uint256 activationEpoch, uint256 deactivationEpoch, uint256 jailTime, address signer, address contractAddress, uint8 status) func (_Stakemanager *StakemanagerSession) Validators(arg0 *big.Int) (struct { Amount *big.Int Reward *big.Int @@ -1438,7 +1699,7 @@ func (_Stakemanager *StakemanagerSession) Validators(arg0 *big.Int) (struct { // Validators is a free data retrieval call binding the contract method 0x35aa2e44. // -// Solidity: function validators(uint256 ) constant returns(uint256 amount, uint256 reward, uint256 activationEpoch, uint256 deactivationEpoch, uint256 jailTime, address signer, address contractAddress, uint8 status) +// Solidity: function validators(uint256 ) view returns(uint256 amount, uint256 reward, uint256 activationEpoch, uint256 deactivationEpoch, uint256 jailTime, address signer, address contractAddress, uint8 status) func (_Stakemanager *StakemanagerCallerSession) Validators(arg0 *big.Int) (struct { Amount *big.Int Reward *big.Int @@ -1454,56 +1715,63 @@ func (_Stakemanager *StakemanagerCallerSession) Validators(arg0 *big.Int) (struc // VerifyConsensus is a free data retrieval call binding the contract method 0xbbcfbbb0. // -// Solidity: function verifyConsensus(bytes32 voteHash, bytes sigs) constant returns(uint256, uint256) +// Solidity: function verifyConsensus(bytes32 voteHash, bytes sigs) view returns(uint256, uint256) func (_Stakemanager *StakemanagerCaller) VerifyConsensus(opts *bind.CallOpts, voteHash [32]byte, sigs []byte) (*big.Int, *big.Int, error) { - var ( - ret0 = new(*big.Int) - ret1 = new(*big.Int) - ) - out := &[]interface{}{ - ret0, - ret1, + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "verifyConsensus", voteHash, sigs) + + if err != nil { + return *new(*big.Int), *new(*big.Int), err } - err := _Stakemanager.contract.Call(opts, out, "verifyConsensus", voteHash, sigs) - return *ret0, *ret1, err + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + out1 := *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + + return out0, out1, err + } // VerifyConsensus is a free data retrieval call binding the contract method 0xbbcfbbb0. // -// Solidity: function verifyConsensus(bytes32 voteHash, bytes sigs) constant returns(uint256, uint256) +// Solidity: function verifyConsensus(bytes32 voteHash, bytes sigs) view returns(uint256, uint256) func (_Stakemanager *StakemanagerSession) VerifyConsensus(voteHash [32]byte, sigs []byte) (*big.Int, *big.Int, error) { return _Stakemanager.Contract.VerifyConsensus(&_Stakemanager.CallOpts, voteHash, sigs) } // VerifyConsensus is a free data retrieval call binding the contract method 0xbbcfbbb0. // -// Solidity: function verifyConsensus(bytes32 voteHash, bytes sigs) constant returns(uint256, uint256) +// Solidity: function verifyConsensus(bytes32 voteHash, bytes sigs) view returns(uint256, uint256) func (_Stakemanager *StakemanagerCallerSession) VerifyConsensus(voteHash [32]byte, sigs []byte) (*big.Int, *big.Int, error) { return _Stakemanager.Contract.VerifyConsensus(&_Stakemanager.CallOpts, voteHash, sigs) } // WithdrawalDelay is a free data retrieval call binding the contract method 0xa7ab6961. // -// Solidity: function withdrawalDelay() constant returns(uint256) +// Solidity: function withdrawalDelay() view returns(uint256) func (_Stakemanager *StakemanagerCaller) WithdrawalDelay(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakemanager.contract.Call(opts, out, "withdrawalDelay") - return *ret0, err + var out []interface{} + err := _Stakemanager.contract.Call(opts, &out, "withdrawalDelay") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // WithdrawalDelay is a free data retrieval call binding the contract method 0xa7ab6961. // -// Solidity: function withdrawalDelay() constant returns(uint256) +// Solidity: function withdrawalDelay() view returns(uint256) func (_Stakemanager *StakemanagerSession) WithdrawalDelay() (*big.Int, error) { return _Stakemanager.Contract.WithdrawalDelay(&_Stakemanager.CallOpts) } // WithdrawalDelay is a free data retrieval call binding the contract method 0xa7ab6961. // -// Solidity: function withdrawalDelay() constant returns(uint256) +// Solidity: function withdrawalDelay() view returns(uint256) func (_Stakemanager *StakemanagerCallerSession) WithdrawalDelay() (*big.Int, error) { return _Stakemanager.Contract.WithdrawalDelay(&_Stakemanager.CallOpts) } @@ -2371,6 +2639,7 @@ func (_Stakemanager *StakemanagerFilterer) ParseOwnershipTransferred(log types.L if err := _Stakemanager.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -2523,5 +2792,6 @@ func (_Stakemanager *StakemanagerFilterer) ParseRootChainChanged(log types.Log) if err := _Stakemanager.contract.UnpackLog(event, "RootChainChanged", log); err != nil { return nil, err } + event.Raw = log return event, nil } diff --git a/contracts/stakinginfo/stakinginfo.go b/contracts/stakinginfo/stakinginfo.go index e91d18d3e..4deb0269f 100644 --- a/contracts/stakinginfo/stakinginfo.go +++ b/contracts/stakinginfo/stakinginfo.go @@ -4,31 +4,38 @@ package stakinginfo import ( + "errors" "math/big" "strings" - ethereum "github.com/maticnetwork/bor" - "github.com/maticnetwork/bor/accounts/abi" - "github.com/maticnetwork/bor/accounts/abi/bind" - "github.com/maticnetwork/bor/common" - "github.com/maticnetwork/bor/core/types" - "github.com/maticnetwork/bor/event" + ethereum "github.com/ethereum/go-ethereum" + "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" + "github.com/ethereum/go-ethereum/event" ) // Reference imports to suppress errors if they are not otherwise used. var ( + _ = errors.New _ = big.NewInt _ = strings.NewReader _ = ethereum.NotFound - _ = abi.U256 _ = bind.Bind _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription ) +// StakinginfoMetaData contains all meta data concerning the Stakinginfo contract. +var StakinginfoMetaData = &bind.MetaData{ + ABI: "[{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"}],\"name\":\"logDelReStaked\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"auctionAmount\",\"type\":\"uint256\"}],\"name\":\"logStartAuction\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"logClaimFee\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"getValidatorContractAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"ValidatorContract\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"}],\"name\":\"logReStaked\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"signerPubkey\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"activationEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"}],\"name\":\"logStaked\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getAccountStateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"accountStateRoot\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"logStakeUpdate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deactivationEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"logUnstakeInit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"getStakerDetails\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"activationEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deactivationEpoch\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_status\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"exitEpoch\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"logJailed\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newDynasty\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"oldDynasty\",\"type\":\"uint256\"}],\"name\":\"logDynastyValueChange\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newProposerBonus\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"oldProposerBonus\",\"type\":\"uint256\"}],\"name\":\"logProposerBonusChange\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"logTopUpFee\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"}],\"name\":\"logUnstaked\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"rewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"logDelClaimRewards\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"logClaimRewards\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newReward\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"oldReward\",\"type\":\"uint256\"}],\"name\":\"logRewardUpdate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"oldSigner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newSigner\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"signerPubkey\",\"type\":\"bytes\"}],\"name\":\"logSignerChange\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"logUnJailed\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"logShareMinted\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newCommissionRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"oldCommissionRate\",\"type\":\"uint256\"}],\"name\":\"logUpdateCommissionRate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"totalValidatorStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorStake\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"logDelUnstaked\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newValidatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"oldValidatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"logConfirmAuction\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"validatorNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"logShareBurned\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newThreshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"oldThreshold\",\"type\":\"uint256\"}],\"name\":\"logThresholdChange\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"logSlashed\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_registry\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"activationEpoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"signerPubkey\",\"type\":\"bytes\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"}],\"name\":\"Unstaked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deactivationEpoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UnstakeInit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldSigner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newSigner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"signerPubkey\",\"type\":\"bytes\"}],\"name\":\"SignerChange\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"}],\"name\":\"ReStaked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"exitEpoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"Jailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"UnJailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Slashed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newThreshold\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldThreshold\",\"type\":\"uint256\"}],\"name\":\"ThresholdChange\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newDynasty\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldDynasty\",\"type\":\"uint256\"}],\"name\":\"DynastyValueChange\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newProposerBonus\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldProposerBonus\",\"type\":\"uint256\"}],\"name\":\"ProposerBonusChange\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newReward\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldReward\",\"type\":\"uint256\"}],\"name\":\"RewardUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newAmount\",\"type\":\"uint256\"}],\"name\":\"StakeUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"ClaimRewards\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"auctionAmount\",\"type\":\"uint256\"}],\"name\":\"StartAuction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newValidatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldValidatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ConfirmAuction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"TopUpFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"ClaimFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"ShareMinted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"ShareBurned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"rewards\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"DelClaimRewards\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"}],\"name\":\"DelReStaked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"DelUnstaked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newCommissionRate\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldCommissionRate\",\"type\":\"uint256\"}],\"name\":\"UpdateCommissionRate\",\"type\":\"event\"}]", +} + // StakinginfoABI is the input ABI used to generate the binding from. -const StakinginfoABI = "[{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"}],\"name\":\"logDelReStaked\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"auctionAmount\",\"type\":\"uint256\"}],\"name\":\"logStartAuction\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"logClaimFee\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"getValidatorContractAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"ValidatorContract\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"}],\"name\":\"logReStaked\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"signerPubkey\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"activationEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"}],\"name\":\"logStaked\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getAccountStateRoot\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"accountStateRoot\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"logStakeUpdate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deactivationEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"logUnstakeInit\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"getStakerDetails\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"activationEpoch\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deactivationEpoch\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_status\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contractRegistry\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"exitEpoch\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"logJailed\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newDynasty\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"oldDynasty\",\"type\":\"uint256\"}],\"name\":\"logDynastyValueChange\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newProposerBonus\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"oldProposerBonus\",\"type\":\"uint256\"}],\"name\":\"logProposerBonusChange\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"logTopUpFee\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"}],\"name\":\"logUnstaked\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"rewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"logDelClaimRewards\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"logClaimRewards\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newReward\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"oldReward\",\"type\":\"uint256\"}],\"name\":\"logRewardUpdate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"oldSigner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"newSigner\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"signerPubkey\",\"type\":\"bytes\"}],\"name\":\"logSignerChange\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"logUnJailed\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"logShareMinted\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"newCommissionRate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"oldCommissionRate\",\"type\":\"uint256\"}],\"name\":\"logUpdateCommissionRate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"totalValidatorStake\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorStake\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"logDelUnstaked\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newValidatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"oldValidatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"logConfirmAuction\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"validatorNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"logShareBurned\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newThreshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"oldThreshold\",\"type\":\"uint256\"}],\"name\":\"logThresholdChange\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"logSlashed\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_registry\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"activationEpoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"signerPubkey\",\"type\":\"bytes\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"}],\"name\":\"Unstaked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"deactivationEpoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UnstakeInit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldSigner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newSigner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"signerPubkey\",\"type\":\"bytes\"}],\"name\":\"SignerChange\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"}],\"name\":\"ReStaked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"exitEpoch\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"Jailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"UnJailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Slashed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newThreshold\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldThreshold\",\"type\":\"uint256\"}],\"name\":\"ThresholdChange\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newDynasty\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldDynasty\",\"type\":\"uint256\"}],\"name\":\"DynastyValueChange\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newProposerBonus\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldProposerBonus\",\"type\":\"uint256\"}],\"name\":\"ProposerBonusChange\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newReward\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldReward\",\"type\":\"uint256\"}],\"name\":\"RewardUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newAmount\",\"type\":\"uint256\"}],\"name\":\"StakeUpdate\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"ClaimRewards\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"auctionAmount\",\"type\":\"uint256\"}],\"name\":\"StartAuction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newValidatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldValidatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ConfirmAuction\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"TopUpFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"ClaimFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"ShareMinted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"ShareBurned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"rewards\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokens\",\"type\":\"uint256\"}],\"name\":\"DelClaimRewards\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"totalStaked\",\"type\":\"uint256\"}],\"name\":\"DelReStaked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"DelUnstaked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newCommissionRate\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldCommissionRate\",\"type\":\"uint256\"}],\"name\":\"UpdateCommissionRate\",\"type\":\"event\"}]" +// Deprecated: Use StakinginfoMetaData.ABI instead. +var StakinginfoABI = StakinginfoMetaData.ABI // Stakinginfo is an auto generated Go binding around an Ethereum contract. type Stakinginfo struct { @@ -138,7 +145,7 @@ func bindStakinginfo(address common.Address, caller bind.ContractCaller, transac // 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 (_Stakinginfo *StakinginfoRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { +func (_Stakinginfo *StakinginfoRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Stakinginfo.Contract.StakinginfoCaller.contract.Call(opts, result, method, params...) } @@ -157,7 +164,7 @@ func (_Stakinginfo *StakinginfoRaw) Transact(opts *bind.TransactOpts, method str // 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 (_Stakinginfo *StakinginfoCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { +func (_Stakinginfo *StakinginfoCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Stakinginfo.Contract.contract.Call(opts, result, method, params...) } @@ -174,33 +181,38 @@ func (_Stakinginfo *StakinginfoTransactorRaw) Transact(opts *bind.TransactOpts, // GetAccountStateRoot is a free data retrieval call binding the contract method 0x4b6b87ce. // -// Solidity: function getAccountStateRoot() constant returns(bytes32 accountStateRoot) +// Solidity: function getAccountStateRoot() view returns(bytes32 accountStateRoot) func (_Stakinginfo *StakinginfoCaller) GetAccountStateRoot(opts *bind.CallOpts) ([32]byte, error) { - var ( - ret0 = new([32]byte) - ) - out := ret0 - err := _Stakinginfo.contract.Call(opts, out, "getAccountStateRoot") - return *ret0, err + var out []interface{} + err := _Stakinginfo.contract.Call(opts, &out, "getAccountStateRoot") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + } // GetAccountStateRoot is a free data retrieval call binding the contract method 0x4b6b87ce. // -// Solidity: function getAccountStateRoot() constant returns(bytes32 accountStateRoot) +// Solidity: function getAccountStateRoot() view returns(bytes32 accountStateRoot) func (_Stakinginfo *StakinginfoSession) GetAccountStateRoot() ([32]byte, error) { return _Stakinginfo.Contract.GetAccountStateRoot(&_Stakinginfo.CallOpts) } // GetAccountStateRoot is a free data retrieval call binding the contract method 0x4b6b87ce. // -// Solidity: function getAccountStateRoot() constant returns(bytes32 accountStateRoot) +// Solidity: function getAccountStateRoot() view returns(bytes32 accountStateRoot) func (_Stakinginfo *StakinginfoCallerSession) GetAccountStateRoot() ([32]byte, error) { return _Stakinginfo.Contract.GetAccountStateRoot(&_Stakinginfo.CallOpts) } // GetStakerDetails is a free data retrieval call binding the contract method 0x78daaf69. // -// Solidity: function getStakerDetails(uint256 validatorId) constant returns(uint256 amount, uint256 reward, uint256 activationEpoch, uint256 deactivationEpoch, address signer, uint256 _status) +// Solidity: function getStakerDetails(uint256 validatorId) view returns(uint256 amount, uint256 reward, uint256 activationEpoch, uint256 deactivationEpoch, address signer, uint256 _status) func (_Stakinginfo *StakinginfoCaller) GetStakerDetails(opts *bind.CallOpts, validatorId *big.Int) (struct { Amount *big.Int Reward *big.Int @@ -209,7 +221,10 @@ func (_Stakinginfo *StakinginfoCaller) GetStakerDetails(opts *bind.CallOpts, val Signer common.Address Status *big.Int }, error) { - ret := new(struct { + var out []interface{} + err := _Stakinginfo.contract.Call(opts, &out, "getStakerDetails", validatorId) + + outstruct := new(struct { Amount *big.Int Reward *big.Int ActivationEpoch *big.Int @@ -217,14 +232,24 @@ func (_Stakinginfo *StakinginfoCaller) GetStakerDetails(opts *bind.CallOpts, val Signer common.Address Status *big.Int }) - out := ret - err := _Stakinginfo.contract.Call(opts, out, "getStakerDetails", validatorId) - return *ret, err + if err != nil { + return *outstruct, err + } + + outstruct.Amount = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.Reward = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.ActivationEpoch = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.DeactivationEpoch = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.Signer = *abi.ConvertType(out[4], new(common.Address)).(*common.Address) + outstruct.Status = *abi.ConvertType(out[5], new(*big.Int)).(**big.Int) + + return *outstruct, err + } // GetStakerDetails is a free data retrieval call binding the contract method 0x78daaf69. // -// Solidity: function getStakerDetails(uint256 validatorId) constant returns(uint256 amount, uint256 reward, uint256 activationEpoch, uint256 deactivationEpoch, address signer, uint256 _status) +// Solidity: function getStakerDetails(uint256 validatorId) view returns(uint256 amount, uint256 reward, uint256 activationEpoch, uint256 deactivationEpoch, address signer, uint256 _status) func (_Stakinginfo *StakinginfoSession) GetStakerDetails(validatorId *big.Int) (struct { Amount *big.Int Reward *big.Int @@ -238,7 +263,7 @@ func (_Stakinginfo *StakinginfoSession) GetStakerDetails(validatorId *big.Int) ( // GetStakerDetails is a free data retrieval call binding the contract method 0x78daaf69. // -// Solidity: function getStakerDetails(uint256 validatorId) constant returns(uint256 amount, uint256 reward, uint256 activationEpoch, uint256 deactivationEpoch, address signer, uint256 _status) +// Solidity: function getStakerDetails(uint256 validatorId) view returns(uint256 amount, uint256 reward, uint256 activationEpoch, uint256 deactivationEpoch, address signer, uint256 _status) func (_Stakinginfo *StakinginfoCallerSession) GetStakerDetails(validatorId *big.Int) (struct { Amount *big.Int Reward *big.Int @@ -252,104 +277,124 @@ func (_Stakinginfo *StakinginfoCallerSession) GetStakerDetails(validatorId *big. // GetValidatorContractAddress is a free data retrieval call binding the contract method 0x178d46aa. // -// Solidity: function getValidatorContractAddress(uint256 validatorId) constant returns(address ValidatorContract) +// Solidity: function getValidatorContractAddress(uint256 validatorId) view returns(address ValidatorContract) func (_Stakinginfo *StakinginfoCaller) GetValidatorContractAddress(opts *bind.CallOpts, validatorId *big.Int) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Stakinginfo.contract.Call(opts, out, "getValidatorContractAddress", validatorId) - return *ret0, err + var out []interface{} + err := _Stakinginfo.contract.Call(opts, &out, "getValidatorContractAddress", validatorId) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // GetValidatorContractAddress is a free data retrieval call binding the contract method 0x178d46aa. // -// Solidity: function getValidatorContractAddress(uint256 validatorId) constant returns(address ValidatorContract) +// Solidity: function getValidatorContractAddress(uint256 validatorId) view returns(address ValidatorContract) func (_Stakinginfo *StakinginfoSession) GetValidatorContractAddress(validatorId *big.Int) (common.Address, error) { return _Stakinginfo.Contract.GetValidatorContractAddress(&_Stakinginfo.CallOpts, validatorId) } // GetValidatorContractAddress is a free data retrieval call binding the contract method 0x178d46aa. // -// Solidity: function getValidatorContractAddress(uint256 validatorId) constant returns(address ValidatorContract) +// Solidity: function getValidatorContractAddress(uint256 validatorId) view returns(address ValidatorContract) func (_Stakinginfo *StakinginfoCallerSession) GetValidatorContractAddress(validatorId *big.Int) (common.Address, error) { return _Stakinginfo.Contract.GetValidatorContractAddress(&_Stakinginfo.CallOpts, validatorId) } // Registry is a free data retrieval call binding the contract method 0x7b103999. // -// Solidity: function registry() constant returns(address) +// Solidity: function registry() view returns(address) func (_Stakinginfo *StakinginfoCaller) Registry(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Stakinginfo.contract.Call(opts, out, "registry") - return *ret0, err + var out []interface{} + err := _Stakinginfo.contract.Call(opts, &out, "registry") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // Registry is a free data retrieval call binding the contract method 0x7b103999. // -// Solidity: function registry() constant returns(address) +// Solidity: function registry() view returns(address) func (_Stakinginfo *StakinginfoSession) Registry() (common.Address, error) { return _Stakinginfo.Contract.Registry(&_Stakinginfo.CallOpts) } // Registry is a free data retrieval call binding the contract method 0x7b103999. // -// Solidity: function registry() constant returns(address) +// Solidity: function registry() view returns(address) func (_Stakinginfo *StakinginfoCallerSession) Registry() (common.Address, error) { return _Stakinginfo.Contract.Registry(&_Stakinginfo.CallOpts) } // TotalValidatorStake is a free data retrieval call binding the contract method 0xca7d34b6. // -// Solidity: function totalValidatorStake(uint256 validatorId) constant returns(uint256 validatorStake) +// Solidity: function totalValidatorStake(uint256 validatorId) view returns(uint256 validatorStake) func (_Stakinginfo *StakinginfoCaller) TotalValidatorStake(opts *bind.CallOpts, validatorId *big.Int) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakinginfo.contract.Call(opts, out, "totalValidatorStake", validatorId) - return *ret0, err + var out []interface{} + err := _Stakinginfo.contract.Call(opts, &out, "totalValidatorStake", validatorId) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // TotalValidatorStake is a free data retrieval call binding the contract method 0xca7d34b6. // -// Solidity: function totalValidatorStake(uint256 validatorId) constant returns(uint256 validatorStake) +// Solidity: function totalValidatorStake(uint256 validatorId) view returns(uint256 validatorStake) func (_Stakinginfo *StakinginfoSession) TotalValidatorStake(validatorId *big.Int) (*big.Int, error) { return _Stakinginfo.Contract.TotalValidatorStake(&_Stakinginfo.CallOpts, validatorId) } // TotalValidatorStake is a free data retrieval call binding the contract method 0xca7d34b6. // -// Solidity: function totalValidatorStake(uint256 validatorId) constant returns(uint256 validatorStake) +// Solidity: function totalValidatorStake(uint256 validatorId) view returns(uint256 validatorStake) func (_Stakinginfo *StakinginfoCallerSession) TotalValidatorStake(validatorId *big.Int) (*big.Int, error) { return _Stakinginfo.Contract.TotalValidatorStake(&_Stakinginfo.CallOpts, validatorId) } // ValidatorNonce is a free data retrieval call binding the contract method 0xebde9f93. // -// Solidity: function validatorNonce(uint256 ) constant returns(uint256) +// Solidity: function validatorNonce(uint256 ) view returns(uint256) func (_Stakinginfo *StakinginfoCaller) ValidatorNonce(opts *bind.CallOpts, arg0 *big.Int) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Stakinginfo.contract.Call(opts, out, "validatorNonce", arg0) - return *ret0, err + var out []interface{} + err := _Stakinginfo.contract.Call(opts, &out, "validatorNonce", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // ValidatorNonce is a free data retrieval call binding the contract method 0xebde9f93. // -// Solidity: function validatorNonce(uint256 ) constant returns(uint256) +// Solidity: function validatorNonce(uint256 ) view returns(uint256) func (_Stakinginfo *StakinginfoSession) ValidatorNonce(arg0 *big.Int) (*big.Int, error) { return _Stakinginfo.Contract.ValidatorNonce(&_Stakinginfo.CallOpts, arg0) } // ValidatorNonce is a free data retrieval call binding the contract method 0xebde9f93. // -// Solidity: function validatorNonce(uint256 ) constant returns(uint256) +// Solidity: function validatorNonce(uint256 ) view returns(uint256) func (_Stakinginfo *StakinginfoCallerSession) ValidatorNonce(arg0 *big.Int) (*big.Int, error) { return _Stakinginfo.Contract.ValidatorNonce(&_Stakinginfo.CallOpts, arg0) } @@ -1007,6 +1052,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseClaimFee(log types.Log) (*Stakingi if err := _Stakinginfo.contract.UnpackLog(event, "ClaimFee", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -1168,6 +1214,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseClaimRewards(log types.Log) (*Stak if err := _Stakinginfo.contract.UnpackLog(event, "ClaimRewards", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -1329,6 +1376,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseConfirmAuction(log types.Log) (*St if err := _Stakinginfo.contract.UnpackLog(event, "ConfirmAuction", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -1491,6 +1539,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseDelClaimRewards(log types.Log) (*S if err := _Stakinginfo.contract.UnpackLog(event, "DelClaimRewards", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -1652,6 +1701,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseDelReStaked(log types.Log) (*Staki if err := _Stakinginfo.contract.UnpackLog(event, "DelReStaked", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -1805,6 +1855,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseDelUnstaked(log types.Log) (*Staki if err := _Stakinginfo.contract.UnpackLog(event, "DelUnstaked", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -1939,6 +1990,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseDynastyValueChange(log types.Log) if err := _Stakinginfo.contract.UnpackLog(event, "DynastyValueChange", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -2100,6 +2152,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseJailed(log types.Log) (*Stakinginf if err := _Stakinginfo.contract.UnpackLog(event, "Jailed", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -2234,6 +2287,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseProposerBonusChange(log types.Log) if err := _Stakinginfo.contract.UnpackLog(event, "ProposerBonusChange", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -2379,6 +2433,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseReStaked(log types.Log) (*Stakingi if err := _Stakinginfo.contract.UnpackLog(event, "ReStaked", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -2513,6 +2568,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseRewardUpdate(log types.Log) (*Stak if err := _Stakinginfo.contract.UnpackLog(event, "RewardUpdate", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -2675,6 +2731,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseShareBurned(log types.Log) (*Staki if err := _Stakinginfo.contract.UnpackLog(event, "ShareBurned", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -2837,6 +2894,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseShareMinted(log types.Log) (*Staki if err := _Stakinginfo.contract.UnpackLog(event, "ShareMinted", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -3002,6 +3060,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseSignerChange(log types.Log) (*Stak if err := _Stakinginfo.contract.UnpackLog(event, "SignerChange", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -3154,6 +3213,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseSlashed(log types.Log) (*Stakingin if err := _Stakinginfo.contract.UnpackLog(event, "Slashed", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -3315,6 +3375,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseStakeUpdate(log types.Log) (*Staki if err := _Stakinginfo.contract.UnpackLog(event, "StakeUpdate", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -3482,6 +3543,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseStaked(log types.Log) (*Stakinginf if err := _Stakinginfo.contract.UnpackLog(event, "Staked", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -3643,6 +3705,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseStartAuction(log types.Log) (*Stak if err := _Stakinginfo.contract.UnpackLog(event, "StartAuction", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -3777,6 +3840,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseThresholdChange(log types.Log) (*S if err := _Stakinginfo.contract.UnpackLog(event, "ThresholdChange", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -3929,6 +3993,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseTopUpFee(log types.Log) (*Stakingi if err := _Stakinginfo.contract.UnpackLog(event, "TopUpFee", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -4081,6 +4146,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseUnJailed(log types.Log) (*Stakingi if err := _Stakinginfo.contract.UnpackLog(event, "UnJailed", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -4246,6 +4312,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseUnstakeInit(log types.Log) (*Staki if err := _Stakinginfo.contract.UnpackLog(event, "UnstakeInit", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -4400,6 +4467,7 @@ func (_Stakinginfo *StakinginfoFilterer) ParseUnstaked(log types.Log) (*Stakingi if err := _Stakinginfo.contract.UnpackLog(event, "Unstaked", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -4561,5 +4629,6 @@ func (_Stakinginfo *StakinginfoFilterer) ParseUpdateCommissionRate(log types.Log if err := _Stakinginfo.contract.UnpackLog(event, "UpdateCommissionRate", log); err != nil { return nil, err } + event.Raw = log return event, nil } diff --git a/contracts/statereceiver/statereceiver.go b/contracts/statereceiver/statereceiver.go index d89e7b9fa..0f9226ac9 100644 --- a/contracts/statereceiver/statereceiver.go +++ b/contracts/statereceiver/statereceiver.go @@ -8,12 +8,12 @@ import ( "math/big" "strings" - ethereum "github.com/maticnetwork/bor" - "github.com/maticnetwork/bor/accounts/abi" - "github.com/maticnetwork/bor/accounts/abi/bind" - "github.com/maticnetwork/bor/common" - "github.com/maticnetwork/bor/core/types" - "github.com/maticnetwork/bor/event" + ethereum "github.com/ethereum/go-ethereum" + "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" + "github.com/ethereum/go-ethereum/event" ) // Reference imports to suppress errors if they are not otherwise used. @@ -28,8 +28,14 @@ var ( _ = event.NewSubscription ) +// StatereceiverMetaData contains all meta data concerning the Statereceiver contract. +var StatereceiverMetaData = &bind.MetaData{ + ABI: "[{\"constant\":true,\"inputs\":[],\"name\":\"SYSTEM_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastStateId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"syncTime\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"recordBytes\",\"type\":\"bytes\"}],\"name\":\"commitState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onStateReceive\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + // StatereceiverABI is the input ABI used to generate the binding from. -const StatereceiverABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"SYSTEM_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"lastStateId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"syncTime\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"recordBytes\",\"type\":\"bytes\"}],\"name\":\"commitState\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onStateReceive\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" +// Deprecated: Use StatereceiverMetaData.ABI instead. +var StatereceiverABI = StatereceiverMetaData.ABI // Statereceiver is an auto generated Go binding around an Ethereum contract. type Statereceiver struct { @@ -177,12 +183,17 @@ func (_Statereceiver *StatereceiverTransactorRaw) Transact(opts *bind.TransactOp // // Solidity: function SYSTEM_ADDRESS() view returns(address) func (_Statereceiver *StatereceiverCaller) SYSTEMADDRESS(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Statereceiver.contract.Call(opts, out, "SYSTEM_ADDRESS") - return *ret0, err + var out []interface{} + err := _Statereceiver.contract.Call(opts, &out, "SYSTEM_ADDRESS") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // SYSTEMADDRESS is a free data retrieval call binding the contract method 0x3434735f. @@ -203,12 +214,16 @@ func (_Statereceiver *StatereceiverCallerSession) SYSTEMADDRESS() (common.Addres // // Solidity: function lastStateId() view returns(uint256) func (_Statereceiver *StatereceiverCaller) LastStateId(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Statereceiver.contract.Call(opts, out, "lastStateId") - return *ret0, err + var out []interface{} + err := _Statereceiver.contract.Call(opts, &out, "lastStateId") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err } diff --git a/contracts/statesender/statesender.go b/contracts/statesender/statesender.go index f4e56b292..2c3d40972 100644 --- a/contracts/statesender/statesender.go +++ b/contracts/statesender/statesender.go @@ -4,31 +4,38 @@ package statesender import ( + "errors" "math/big" "strings" - ethereum "github.com/maticnetwork/bor" - "github.com/maticnetwork/bor/accounts/abi" - "github.com/maticnetwork/bor/accounts/abi/bind" - "github.com/maticnetwork/bor/common" - "github.com/maticnetwork/bor/core/types" - "github.com/maticnetwork/bor/event" + ethereum "github.com/ethereum/go-ethereum" + "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" + "github.com/ethereum/go-ethereum/event" ) // Reference imports to suppress errors if they are not otherwise used. var ( + _ = errors.New _ = big.NewInt _ = strings.NewReader _ = ethereum.NotFound - _ = abi.U256 _ = bind.Bind _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription ) +// StatesenderMetaData contains all meta data concerning the Statesender contract. +var StatesenderMetaData = &bind.MetaData{ + ABI: "[{\"constant\":false,\"inputs\":[{\"name\":\"receiver\",\"type\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"syncState\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"counter\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"registrations\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sender\",\"type\":\"address\"},{\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"register\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"NewRegistration\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"StateSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]", +} + // StatesenderABI is the input ABI used to generate the binding from. -const StatesenderABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"receiver\",\"type\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"syncState\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"counter\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isOwner\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"registrations\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"sender\",\"type\":\"address\"},{\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"register\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"user\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"NewRegistration\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"contractAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"StateSynced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]" +// Deprecated: Use StatesenderMetaData.ABI instead. +var StatesenderABI = StatesenderMetaData.ABI // Statesender is an auto generated Go binding around an Ethereum contract. type Statesender struct { @@ -138,7 +145,7 @@ func bindStatesender(address common.Address, caller bind.ContractCaller, transac // 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 (_Statesender *StatesenderRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { +func (_Statesender *StatesenderRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Statesender.Contract.StatesenderCaller.contract.Call(opts, result, method, params...) } @@ -157,7 +164,7 @@ func (_Statesender *StatesenderRaw) Transact(opts *bind.TransactOpts, method str // 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 (_Statesender *StatesenderCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { +func (_Statesender *StatesenderCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Statesender.Contract.contract.Call(opts, result, method, params...) } @@ -174,104 +181,124 @@ func (_Statesender *StatesenderTransactorRaw) Transact(opts *bind.TransactOpts, // Counter is a free data retrieval call binding the contract method 0x61bc221a. // -// Solidity: function counter() constant returns(uint256) +// Solidity: function counter() view returns(uint256) func (_Statesender *StatesenderCaller) Counter(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Statesender.contract.Call(opts, out, "counter") - return *ret0, err + var out []interface{} + err := _Statesender.contract.Call(opts, &out, "counter") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // Counter is a free data retrieval call binding the contract method 0x61bc221a. // -// Solidity: function counter() constant returns(uint256) +// Solidity: function counter() view returns(uint256) func (_Statesender *StatesenderSession) Counter() (*big.Int, error) { return _Statesender.Contract.Counter(&_Statesender.CallOpts) } // Counter is a free data retrieval call binding the contract method 0x61bc221a. // -// Solidity: function counter() constant returns(uint256) +// Solidity: function counter() view returns(uint256) func (_Statesender *StatesenderCallerSession) Counter() (*big.Int, error) { return _Statesender.Contract.Counter(&_Statesender.CallOpts) } // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. // -// Solidity: function isOwner() constant returns(bool) +// Solidity: function isOwner() view returns(bool) func (_Statesender *StatesenderCaller) IsOwner(opts *bind.CallOpts) (bool, error) { - var ( - ret0 = new(bool) - ) - out := ret0 - err := _Statesender.contract.Call(opts, out, "isOwner") - return *ret0, err + var out []interface{} + err := _Statesender.contract.Call(opts, &out, "isOwner") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + } // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. // -// Solidity: function isOwner() constant returns(bool) +// Solidity: function isOwner() view returns(bool) func (_Statesender *StatesenderSession) IsOwner() (bool, error) { return _Statesender.Contract.IsOwner(&_Statesender.CallOpts) } // IsOwner is a free data retrieval call binding the contract method 0x8f32d59b. // -// Solidity: function isOwner() constant returns(bool) +// Solidity: function isOwner() view returns(bool) func (_Statesender *StatesenderCallerSession) IsOwner() (bool, error) { return _Statesender.Contract.IsOwner(&_Statesender.CallOpts) } // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function owner() constant returns(address) +// Solidity: function owner() view returns(address) func (_Statesender *StatesenderCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Statesender.contract.Call(opts, out, "owner") - return *ret0, err + var out []interface{} + err := _Statesender.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function owner() constant returns(address) +// Solidity: function owner() view returns(address) func (_Statesender *StatesenderSession) Owner() (common.Address, error) { return _Statesender.Contract.Owner(&_Statesender.CallOpts) } // Owner is a free data retrieval call binding the contract method 0x8da5cb5b. // -// Solidity: function owner() constant returns(address) +// Solidity: function owner() view returns(address) func (_Statesender *StatesenderCallerSession) Owner() (common.Address, error) { return _Statesender.Contract.Owner(&_Statesender.CallOpts) } // Registrations is a free data retrieval call binding the contract method 0x942e6bcf. // -// Solidity: function registrations(address ) constant returns(address) +// Solidity: function registrations(address ) view returns(address) func (_Statesender *StatesenderCaller) Registrations(opts *bind.CallOpts, arg0 common.Address) (common.Address, error) { - var ( - ret0 = new(common.Address) - ) - out := ret0 - err := _Statesender.contract.Call(opts, out, "registrations", arg0) - return *ret0, err + var out []interface{} + err := _Statesender.contract.Call(opts, &out, "registrations", arg0) + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + } // Registrations is a free data retrieval call binding the contract method 0x942e6bcf. // -// Solidity: function registrations(address ) constant returns(address) +// Solidity: function registrations(address ) view returns(address) func (_Statesender *StatesenderSession) Registrations(arg0 common.Address) (common.Address, error) { return _Statesender.Contract.Registrations(&_Statesender.CallOpts, arg0) } // Registrations is a free data retrieval call binding the contract method 0x942e6bcf. // -// Solidity: function registrations(address ) constant returns(address) +// Solidity: function registrations(address ) view returns(address) func (_Statesender *StatesenderCallerSession) Registrations(arg0 common.Address) (common.Address, error) { return _Statesender.Contract.Registrations(&_Statesender.CallOpts, arg0) } @@ -518,6 +545,7 @@ func (_Statesender *StatesenderFilterer) ParseNewRegistration(log types.Log) (*S if err := _Statesender.contract.UnpackLog(event, "NewRegistration", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -670,6 +698,7 @@ func (_Statesender *StatesenderFilterer) ParseOwnershipTransferred(log types.Log if err := _Statesender.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { return nil, err } + event.Raw = log return event, nil } @@ -823,5 +852,6 @@ func (_Statesender *StatesenderFilterer) ParseStateSynced(log types.Log) (*State if err := _Statesender.contract.UnpackLog(event, "StateSynced", log); err != nil { return nil, err } + event.Raw = log return event, nil } diff --git a/contracts/validatorset/validatorset.go b/contracts/validatorset/validatorset.go index e537c511d..67c00e0b8 100644 --- a/contracts/validatorset/validatorset.go +++ b/contracts/validatorset/validatorset.go @@ -4,31 +4,38 @@ package validatorset import ( + "errors" "math/big" "strings" - ethereum "github.com/maticnetwork/bor" - "github.com/maticnetwork/bor/accounts/abi" - "github.com/maticnetwork/bor/accounts/abi/bind" - "github.com/maticnetwork/bor/common" - "github.com/maticnetwork/bor/core/types" - "github.com/maticnetwork/bor/event" + ethereum "github.com/ethereum/go-ethereum" + "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" + "github.com/ethereum/go-ethereum/event" ) // Reference imports to suppress errors if they are not otherwise used. var ( + _ = errors.New _ = big.NewInt _ = strings.NewReader _ = ethereum.NotFound - _ = abi.U256 _ = bind.Bind _ = common.Big1 _ = types.BloomLookup _ = event.NewSubscription ) +// ValidatorsetMetaData contains all meta data concerning the Validatorset contract. +var ValidatorsetMetaData = &bind.MetaData{ + ABI: "[{\"constant\":true,\"inputs\":[{\"name\":\"span\",\"type\":\"uint256\"}],\"name\":\"getSpan\",\"outputs\":[{\"name\":\"number\",\"type\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint256\"},{\"name\":\"endBlock\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"vote\",\"type\":\"bytes\"},{\"name\":\"sigs\",\"type\":\"bytes\"},{\"name\":\"txBytes\",\"type\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"commitSpan\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentSpanNumber\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getNextSpan\",\"outputs\":[{\"name\":\"number\",\"type\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint256\"},{\"name\":\"endBlock\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getInitialValidators\",\"outputs\":[{\"name\":\"\",\"type\":\"address[]\"},{\"name\":\"\",\"type\":\"uint256[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCurrentSpan\",\"outputs\":[{\"name\":\"number\",\"type\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint256\"},{\"name\":\"endBlock\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getValidators\",\"outputs\":[{\"name\":\"\",\"type\":\"address[]\"},{\"name\":\"\",\"type\":\"uint256[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"vote\",\"type\":\"bytes\"},{\"name\":\"sigs\",\"type\":\"bytes\"},{\"name\":\"txBytes\",\"type\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"validateValidatorSet\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + // ValidatorsetABI is the input ABI used to generate the binding from. -const ValidatorsetABI = "[{\"constant\":true,\"inputs\":[{\"name\":\"span\",\"type\":\"uint256\"}],\"name\":\"getSpan\",\"outputs\":[{\"name\":\"number\",\"type\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint256\"},{\"name\":\"endBlock\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"vote\",\"type\":\"bytes\"},{\"name\":\"sigs\",\"type\":\"bytes\"},{\"name\":\"txBytes\",\"type\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"commitSpan\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentSpanNumber\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getNextSpan\",\"outputs\":[{\"name\":\"number\",\"type\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint256\"},{\"name\":\"endBlock\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getInitialValidators\",\"outputs\":[{\"name\":\"\",\"type\":\"address[]\"},{\"name\":\"\",\"type\":\"uint256[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCurrentSpan\",\"outputs\":[{\"name\":\"number\",\"type\":\"uint256\"},{\"name\":\"startBlock\",\"type\":\"uint256\"},{\"name\":\"endBlock\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getValidators\",\"outputs\":[{\"name\":\"\",\"type\":\"address[]\"},{\"name\":\"\",\"type\":\"uint256[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"vote\",\"type\":\"bytes\"},{\"name\":\"sigs\",\"type\":\"bytes\"},{\"name\":\"txBytes\",\"type\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"validateValidatorSet\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]" +// Deprecated: Use ValidatorsetMetaData.ABI instead. +var ValidatorsetABI = ValidatorsetMetaData.ABI // Validatorset is an auto generated Go binding around an Ethereum contract. type Validatorset struct { @@ -138,7 +145,7 @@ func bindValidatorset(address common.Address, caller bind.ContractCaller, transa // 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 (_Validatorset *ValidatorsetRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { +func (_Validatorset *ValidatorsetRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Validatorset.Contract.ValidatorsetCaller.contract.Call(opts, result, method, params...) } @@ -157,7 +164,7 @@ func (_Validatorset *ValidatorsetRaw) Transact(opts *bind.TransactOpts, method s // 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 (_Validatorset *ValidatorsetCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { +func (_Validatorset *ValidatorsetCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { return _Validatorset.Contract.contract.Call(opts, result, method, params...) } @@ -174,51 +181,66 @@ func (_Validatorset *ValidatorsetTransactorRaw) Transact(opts *bind.TransactOpts // CurrentSpanNumber is a free data retrieval call binding the contract method 0x4dbc959f. // -// Solidity: function currentSpanNumber() constant returns(uint256) +// Solidity: function currentSpanNumber() view returns(uint256) func (_Validatorset *ValidatorsetCaller) CurrentSpanNumber(opts *bind.CallOpts) (*big.Int, error) { - var ( - ret0 = new(*big.Int) - ) - out := ret0 - err := _Validatorset.contract.Call(opts, out, "currentSpanNumber") - return *ret0, err + var out []interface{} + err := _Validatorset.contract.Call(opts, &out, "currentSpanNumber") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + } // CurrentSpanNumber is a free data retrieval call binding the contract method 0x4dbc959f. // -// Solidity: function currentSpanNumber() constant returns(uint256) +// Solidity: function currentSpanNumber() view returns(uint256) func (_Validatorset *ValidatorsetSession) CurrentSpanNumber() (*big.Int, error) { return _Validatorset.Contract.CurrentSpanNumber(&_Validatorset.CallOpts) } // CurrentSpanNumber is a free data retrieval call binding the contract method 0x4dbc959f. // -// Solidity: function currentSpanNumber() constant returns(uint256) +// Solidity: function currentSpanNumber() view returns(uint256) func (_Validatorset *ValidatorsetCallerSession) CurrentSpanNumber() (*big.Int, error) { return _Validatorset.Contract.CurrentSpanNumber(&_Validatorset.CallOpts) } // GetCurrentSpan is a free data retrieval call binding the contract method 0xaf26aa96. // -// Solidity: function getCurrentSpan() constant returns(uint256 number, uint256 startBlock, uint256 endBlock) +// Solidity: function getCurrentSpan() view returns(uint256 number, uint256 startBlock, uint256 endBlock) func (_Validatorset *ValidatorsetCaller) GetCurrentSpan(opts *bind.CallOpts) (struct { Number *big.Int StartBlock *big.Int EndBlock *big.Int }, error) { - ret := new(struct { + var out []interface{} + err := _Validatorset.contract.Call(opts, &out, "getCurrentSpan") + + outstruct := new(struct { Number *big.Int StartBlock *big.Int EndBlock *big.Int }) - out := ret - err := _Validatorset.contract.Call(opts, out, "getCurrentSpan") - return *ret, err + if err != nil { + return *outstruct, err + } + + outstruct.Number = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.StartBlock = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.EndBlock = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + + return *outstruct, err + } // GetCurrentSpan is a free data retrieval call binding the contract method 0xaf26aa96. // -// Solidity: function getCurrentSpan() constant returns(uint256 number, uint256 startBlock, uint256 endBlock) +// Solidity: function getCurrentSpan() view returns(uint256 number, uint256 startBlock, uint256 endBlock) func (_Validatorset *ValidatorsetSession) GetCurrentSpan() (struct { Number *big.Int StartBlock *big.Int @@ -229,7 +251,7 @@ func (_Validatorset *ValidatorsetSession) GetCurrentSpan() (struct { // GetCurrentSpan is a free data retrieval call binding the contract method 0xaf26aa96. // -// Solidity: function getCurrentSpan() constant returns(uint256 number, uint256 startBlock, uint256 endBlock) +// Solidity: function getCurrentSpan() view returns(uint256 number, uint256 startBlock, uint256 endBlock) func (_Validatorset *ValidatorsetCallerSession) GetCurrentSpan() (struct { Number *big.Int StartBlock *big.Int @@ -240,55 +262,67 @@ func (_Validatorset *ValidatorsetCallerSession) GetCurrentSpan() (struct { // GetInitialValidators is a free data retrieval call binding the contract method 0x65b3a1e2. // -// Solidity: function getInitialValidators() constant returns(address[], uint256[]) +// Solidity: function getInitialValidators() view returns(address[], uint256[]) func (_Validatorset *ValidatorsetCaller) GetInitialValidators(opts *bind.CallOpts) ([]common.Address, []*big.Int, error) { - var ( - ret0 = new([]common.Address) - ret1 = new([]*big.Int) - ) - out := &[]interface{}{ - ret0, - ret1, + var out []interface{} + err := _Validatorset.contract.Call(opts, &out, "getInitialValidators") + + if err != nil { + return *new([]common.Address), *new([]*big.Int), err } - err := _Validatorset.contract.Call(opts, out, "getInitialValidators") - return *ret0, *ret1, err + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + out1 := *abi.ConvertType(out[1], new([]*big.Int)).(*[]*big.Int) + + return out0, out1, err + } // GetInitialValidators is a free data retrieval call binding the contract method 0x65b3a1e2. // -// Solidity: function getInitialValidators() constant returns(address[], uint256[]) +// Solidity: function getInitialValidators() view returns(address[], uint256[]) func (_Validatorset *ValidatorsetSession) GetInitialValidators() ([]common.Address, []*big.Int, error) { return _Validatorset.Contract.GetInitialValidators(&_Validatorset.CallOpts) } // GetInitialValidators is a free data retrieval call binding the contract method 0x65b3a1e2. // -// Solidity: function getInitialValidators() constant returns(address[], uint256[]) +// Solidity: function getInitialValidators() view returns(address[], uint256[]) func (_Validatorset *ValidatorsetCallerSession) GetInitialValidators() ([]common.Address, []*big.Int, error) { return _Validatorset.Contract.GetInitialValidators(&_Validatorset.CallOpts) } // GetNextSpan is a free data retrieval call binding the contract method 0x60c8614d. // -// Solidity: function getNextSpan() constant returns(uint256 number, uint256 startBlock, uint256 endBlock) +// Solidity: function getNextSpan() view returns(uint256 number, uint256 startBlock, uint256 endBlock) func (_Validatorset *ValidatorsetCaller) GetNextSpan(opts *bind.CallOpts) (struct { Number *big.Int StartBlock *big.Int EndBlock *big.Int }, error) { - ret := new(struct { + var out []interface{} + err := _Validatorset.contract.Call(opts, &out, "getNextSpan") + + outstruct := new(struct { Number *big.Int StartBlock *big.Int EndBlock *big.Int }) - out := ret - err := _Validatorset.contract.Call(opts, out, "getNextSpan") - return *ret, err + if err != nil { + return *outstruct, err + } + + outstruct.Number = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.StartBlock = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.EndBlock = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + + return *outstruct, err + } // GetNextSpan is a free data retrieval call binding the contract method 0x60c8614d. // -// Solidity: function getNextSpan() constant returns(uint256 number, uint256 startBlock, uint256 endBlock) +// Solidity: function getNextSpan() view returns(uint256 number, uint256 startBlock, uint256 endBlock) func (_Validatorset *ValidatorsetSession) GetNextSpan() (struct { Number *big.Int StartBlock *big.Int @@ -299,7 +333,7 @@ func (_Validatorset *ValidatorsetSession) GetNextSpan() (struct { // GetNextSpan is a free data retrieval call binding the contract method 0x60c8614d. // -// Solidity: function getNextSpan() constant returns(uint256 number, uint256 startBlock, uint256 endBlock) +// Solidity: function getNextSpan() view returns(uint256 number, uint256 startBlock, uint256 endBlock) func (_Validatorset *ValidatorsetCallerSession) GetNextSpan() (struct { Number *big.Int StartBlock *big.Int @@ -310,25 +344,35 @@ func (_Validatorset *ValidatorsetCallerSession) GetNextSpan() (struct { // GetSpan is a free data retrieval call binding the contract method 0x047a6c5b. // -// Solidity: function getSpan(uint256 span) constant returns(uint256 number, uint256 startBlock, uint256 endBlock) +// Solidity: function getSpan(uint256 span) view returns(uint256 number, uint256 startBlock, uint256 endBlock) func (_Validatorset *ValidatorsetCaller) GetSpan(opts *bind.CallOpts, span *big.Int) (struct { Number *big.Int StartBlock *big.Int EndBlock *big.Int }, error) { - ret := new(struct { + var out []interface{} + err := _Validatorset.contract.Call(opts, &out, "getSpan", span) + + outstruct := new(struct { Number *big.Int StartBlock *big.Int EndBlock *big.Int }) - out := ret - err := _Validatorset.contract.Call(opts, out, "getSpan", span) - return *ret, err + if err != nil { + return *outstruct, err + } + + outstruct.Number = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.StartBlock = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.EndBlock = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + + return *outstruct, err + } // GetSpan is a free data retrieval call binding the contract method 0x047a6c5b. // -// Solidity: function getSpan(uint256 span) constant returns(uint256 number, uint256 startBlock, uint256 endBlock) +// Solidity: function getSpan(uint256 span) view returns(uint256 number, uint256 startBlock, uint256 endBlock) func (_Validatorset *ValidatorsetSession) GetSpan(span *big.Int) (struct { Number *big.Int StartBlock *big.Int @@ -339,7 +383,7 @@ func (_Validatorset *ValidatorsetSession) GetSpan(span *big.Int) (struct { // GetSpan is a free data retrieval call binding the contract method 0x047a6c5b. // -// Solidity: function getSpan(uint256 span) constant returns(uint256 number, uint256 startBlock, uint256 endBlock) +// Solidity: function getSpan(uint256 span) view returns(uint256 number, uint256 startBlock, uint256 endBlock) func (_Validatorset *ValidatorsetCallerSession) GetSpan(span *big.Int) (struct { Number *big.Int StartBlock *big.Int @@ -350,30 +394,32 @@ func (_Validatorset *ValidatorsetCallerSession) GetSpan(span *big.Int) (struct { // GetValidators is a free data retrieval call binding the contract method 0xb7ab4db5. // -// Solidity: function getValidators() constant returns(address[], uint256[]) +// Solidity: function getValidators() view returns(address[], uint256[]) func (_Validatorset *ValidatorsetCaller) GetValidators(opts *bind.CallOpts) ([]common.Address, []*big.Int, error) { - var ( - ret0 = new([]common.Address) - ret1 = new([]*big.Int) - ) - out := &[]interface{}{ - ret0, - ret1, + var out []interface{} + err := _Validatorset.contract.Call(opts, &out, "getValidators") + + if err != nil { + return *new([]common.Address), *new([]*big.Int), err } - err := _Validatorset.contract.Call(opts, out, "getValidators") - return *ret0, *ret1, err + + out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) + out1 := *abi.ConvertType(out[1], new([]*big.Int)).(*[]*big.Int) + + return out0, out1, err + } // GetValidators is a free data retrieval call binding the contract method 0xb7ab4db5. // -// Solidity: function getValidators() constant returns(address[], uint256[]) +// Solidity: function getValidators() view returns(address[], uint256[]) func (_Validatorset *ValidatorsetSession) GetValidators() ([]common.Address, []*big.Int, error) { return _Validatorset.Contract.GetValidators(&_Validatorset.CallOpts) } // GetValidators is a free data retrieval call binding the contract method 0xb7ab4db5. // -// Solidity: function getValidators() constant returns(address[], uint256[]) +// Solidity: function getValidators() view returns(address[], uint256[]) func (_Validatorset *ValidatorsetCallerSession) GetValidators() ([]common.Address, []*big.Int, error) { return _Validatorset.Contract.GetValidators(&_Validatorset.CallOpts) } diff --git a/helper/unpack.go b/helper/unpack.go index 814b9a796..206065f86 100644 --- a/helper/unpack.go +++ b/helper/unpack.go @@ -21,8 +21,9 @@ var ( // UnpackLog unpacks log func UnpackLog(abiObject *abi.ABI, out interface{}, event string, log *types.Log) error { + var err error if len(log.Data) > 0 { - if err := abiObject.Unpack(out, event, log.Data); err != nil { + if out, err = abiObject.Unpack(event, log.Data); err != nil { return err } } diff --git a/helper/util.go b/helper/util.go index d94272ed2..eb18d3b6c 100644 --- a/helper/util.go +++ b/helper/util.go @@ -761,7 +761,7 @@ func UnpackSigAndVotes(payload []byte, abi abi.ABI) (votes []byte, sigs []byte, // EventByID looks up a event by the topic id func EventByID(abiObject *abi.ABI, sigdata []byte) *abi.Event { for _, event := range abiObject.Events { - if bytes.Equal(event.Id().Bytes(), sigdata) { + if bytes.Equal(event.ID.Bytes(), sigdata) { return &event } }