commit 91cf081eda1133ba26c39749363edd378a3012e3 Author: Hendrik Hofstadt Date: Thu Jan 23 23:09:21 2020 +0100 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5e538d8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.idea +*.iml +bin +generated diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..03ece8c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM golang:stretch as builder + +COPY . /opt +WORKDIR /opt + +RUN make build + +FROM scratch + +COPY --from=builder /opt/bin/chainlink_exporter / + +CMD ["/chainlink_exporter"] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c84d865 --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +abi/aggregator.go: contracts/Aggregator.abi + abigen --abi ./contracts/Aggregator.abi --pkg abi --type Aggregator --out abi/aggregator.go + +abi/oracle.go: contracts/Oracle.abi + abigen --abi ./contracts/Oracle.abi --pkg abi --type Oracle --out abi/oracle.go + +abi/link.go: contracts/LinkToken.abi + abigen --abi ./contracts/LinkToken.abi --pkg abi --type ERC --out abi/link.go + +.PHONY: abi +abi: abi/aggregator.go abi/oracle.go abi/link.go + +.PHONY: build +build: abi + CGO_ENABLED=0 go build -o bin/chainlink_exporter ./cmd/chainlink_exporter diff --git a/README.md b/README.md new file mode 100644 index 0000000..fe6b547 --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +## Chainlink oracle exporter + +This prometheus exporter watches a Chainlink oracle smart contract on the Ethereum blockchain and measures metrics on +request fulfillment. + +In order to track whether the exporter is alive and following the chain we export `cl_mon_height` which indicates the +last block the exporter has seen. + +### How to build + +Running `make build` will build artifacts to `bin`. + +The `Dockerfile` can also be used to build a container. + +We provide a prebuilt container image on [DockerHub](https://hub.docker.com/r/certusone/chainlink_exporter): `certusone/chainlink_exporter` + +### Configuration + +The configuration needs to be passed in via the environment. + +| Name | Description | +|------|-------------| +| LADDR | Listening address (e.g. `:8080`). +| RPC | Websocket URL of the ethereum node to connect to. | +| ADDRESS | The address of the oracle contract to watch. | +| NODE_ADDRESS | The address of the node that's fulfilling the requests. | +| LINK_ADDRESS | The address of the LINK ERC20 token contract. Defaults to the mainnet contract. | + +### Metrics + +| Name | Type | Description | +|------|-------------|----------| +| cl_mon_height | gauge | Last processed block number. | +| cl_mon_last_request | gauge | Block number in which the last request was received. | +| cl_mon_last_response | gauge | Block number in which the last response was sent from the oracle. | +| cl_mon_response_time_bucket | histogram | Number of blocks taken to fulfill requests. Histograms are partitioned by the label `spec_id`. | +| cl_mon_missed | counter | Number of missed requests. Labels indicate job/spec id, requester address. | +| cl_mon_fulfilled | counter | Number of fulfilled requests. Labels indicate job/spec id, requester address. | +| cl_mon_rewards | counter | Rewards collected in LINK. Labels indicate job/spec id, requester address and whether the request containing this payment was fulfilled successfully. **Only payments of fulfilled requests are withdrawable.** | +| cl_mon_eth_balance | gauge | Eth balance of the node account. | +| cl_mon_link_balance | gauge | LINK balance of the oracle contract. The value with `type=balance` is the ERC20 balance. The value with `type=withdrawable` is the withdrawable balance. | + +### Error handling + +In case of errors during startup the program will panic. Errors during runtime are printed to the console and might +lead to the exporter not processing blocks. This will be visible in prometheus as `cl_mon_height` will stop increasing. + +The client will automatically try to reconnect and -subscribe once the endpoint becomes available again. diff --git a/abi/aggregator.go b/abi/aggregator.go new file mode 100644 index 0000000..19c4e4b --- /dev/null +++ b/abi/aggregator.go @@ -0,0 +1,1838 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package abi + +import ( + "math/big" + "strings" + + 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 ( + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = abi.U256 + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// AggregatorABI is the input ABI used to generate the binding from. +const AggregatorABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_requestId\",\"type\":\"bytes32\"},{\"name\":\"_payment\",\"type\":\"uint256\"},{\"name\":\"_expiration\",\"type\":\"uint256\"}],\"name\":\"cancelRequest\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"authorizedRequesters\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"jobIds\",\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"latestAnswer\",\"outputs\":[{\"name\":\"\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minimumResponses\",\"outputs\":[{\"name\":\"\",\"type\":\"uint128\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"oracles\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_recipient\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transferLINK\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"latestRound\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_clRequestId\",\"type\":\"bytes32\"},{\"name\":\"_response\",\"type\":\"int256\"}],\"name\":\"chainlinkCallback\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_paymentAmount\",\"type\":\"uint128\"},{\"name\":\"_minimumResponses\",\"type\":\"uint128\"},{\"name\":\"_oracles\",\"type\":\"address[]\"},{\"name\":\"_jobIds\",\"type\":\"bytes32[]\"}],\"name\":\"updateRequestDetails\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"latestTimestamp\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"destroy\",\"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\":\"_roundId\",\"type\":\"uint256\"}],\"name\":\"getAnswer\",\"outputs\":[{\"name\":\"\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_roundId\",\"type\":\"uint256\"}],\"name\":\"getTimestamp\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"paymentAmount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint128\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"requestRateUpdate\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_requester\",\"type\":\"address\"},{\"name\":\"_allowed\",\"type\":\"bool\"}],\"name\":\"setAuthorization\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_link\",\"type\":\"address\"},{\"name\":\"_paymentAmount\",\"type\":\"uint128\"},{\"name\":\"_minimumResponses\",\"type\":\"uint128\"},{\"name\":\"_oracles\",\"type\":\"address[]\"},{\"name\":\"_jobIds\",\"type\":\"bytes32[]\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"response\",\"type\":\"int256\"},{\"indexed\":true,\"name\":\"answerId\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ResponseReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"}],\"name\":\"OwnershipRenounced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"ChainlinkRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"ChainlinkFulfilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"ChainlinkCancelled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"current\",\"type\":\"int256\"},{\"indexed\":true,\"name\":\"roundId\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"timestamp\",\"type\":\"uint256\"}],\"name\":\"AnswerUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"roundId\",\"type\":\"uint256\"},{\"indexed\":true,\"name\":\"startedBy\",\"type\":\"address\"}],\"name\":\"NewRound\",\"type\":\"event\"}]" + +// Aggregator is an auto generated Go binding around an Ethereum contract. +type Aggregator struct { + AggregatorCaller // Read-only binding to the contract + AggregatorTransactor // Write-only binding to the contract + AggregatorFilterer // Log filterer for contract events +} + +// AggregatorCaller is an auto generated read-only Go binding around an Ethereum contract. +type AggregatorCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AggregatorTransactor is an auto generated write-only Go binding around an Ethereum contract. +type AggregatorTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AggregatorFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type AggregatorFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// AggregatorSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type AggregatorSession struct { + Contract *Aggregator // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// AggregatorCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type AggregatorCallerSession struct { + Contract *AggregatorCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// AggregatorTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type AggregatorTransactorSession struct { + Contract *AggregatorTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// AggregatorRaw is an auto generated low-level Go binding around an Ethereum contract. +type AggregatorRaw struct { + Contract *Aggregator // Generic contract binding to access the raw methods on +} + +// AggregatorCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type AggregatorCallerRaw struct { + Contract *AggregatorCaller // Generic read-only contract binding to access the raw methods on +} + +// AggregatorTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type AggregatorTransactorRaw struct { + Contract *AggregatorTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewAggregator creates a new instance of Aggregator, bound to a specific deployed contract. +func NewAggregator(address common.Address, backend bind.ContractBackend) (*Aggregator, error) { + contract, err := bindAggregator(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Aggregator{AggregatorCaller: AggregatorCaller{contract: contract}, AggregatorTransactor: AggregatorTransactor{contract: contract}, AggregatorFilterer: AggregatorFilterer{contract: contract}}, nil +} + +// NewAggregatorCaller creates a new read-only instance of Aggregator, bound to a specific deployed contract. +func NewAggregatorCaller(address common.Address, caller bind.ContractCaller) (*AggregatorCaller, error) { + contract, err := bindAggregator(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &AggregatorCaller{contract: contract}, nil +} + +// NewAggregatorTransactor creates a new write-only instance of Aggregator, bound to a specific deployed contract. +func NewAggregatorTransactor(address common.Address, transactor bind.ContractTransactor) (*AggregatorTransactor, error) { + contract, err := bindAggregator(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &AggregatorTransactor{contract: contract}, nil +} + +// NewAggregatorFilterer creates a new log filterer instance of Aggregator, bound to a specific deployed contract. +func NewAggregatorFilterer(address common.Address, filterer bind.ContractFilterer) (*AggregatorFilterer, error) { + contract, err := bindAggregator(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &AggregatorFilterer{contract: contract}, nil +} + +// bindAggregator binds a generic wrapper to an already deployed contract. +func bindAggregator(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(AggregatorABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Aggregator *AggregatorRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Aggregator.Contract.AggregatorCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Aggregator *AggregatorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Aggregator.Contract.AggregatorTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Aggregator *AggregatorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Aggregator.Contract.AggregatorTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Aggregator *AggregatorCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Aggregator.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Aggregator *AggregatorTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Aggregator.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Aggregator *AggregatorTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Aggregator.Contract.contract.Transact(opts, method, params...) +} + +// AuthorizedRequesters is a free data retrieval call binding the contract method 0x3ea478aa. +// +// Solidity: function authorizedRequesters(address ) constant returns(bool) +func (_Aggregator *AggregatorCaller) AuthorizedRequesters(opts *bind.CallOpts, arg0 common.Address) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _Aggregator.contract.Call(opts, out, "authorizedRequesters", arg0) + return *ret0, err +} + +// AuthorizedRequesters is a free data retrieval call binding the contract method 0x3ea478aa. +// +// Solidity: function authorizedRequesters(address ) constant returns(bool) +func (_Aggregator *AggregatorSession) AuthorizedRequesters(arg0 common.Address) (bool, error) { + return _Aggregator.Contract.AuthorizedRequesters(&_Aggregator.CallOpts, arg0) +} + +// AuthorizedRequesters is a free data retrieval call binding the contract method 0x3ea478aa. +// +// Solidity: function authorizedRequesters(address ) constant returns(bool) +func (_Aggregator *AggregatorCallerSession) AuthorizedRequesters(arg0 common.Address) (bool, error) { + return _Aggregator.Contract.AuthorizedRequesters(&_Aggregator.CallOpts, arg0) +} + +// GetAnswer is a free data retrieval call binding the contract method 0xb5ab58dc. +// +// Solidity: function getAnswer(uint256 _roundId) constant returns(int256) +func (_Aggregator *AggregatorCaller) GetAnswer(opts *bind.CallOpts, _roundId *big.Int) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _Aggregator.contract.Call(opts, out, "getAnswer", _roundId) + return *ret0, err +} + +// GetAnswer is a free data retrieval call binding the contract method 0xb5ab58dc. +// +// Solidity: function getAnswer(uint256 _roundId) constant returns(int256) +func (_Aggregator *AggregatorSession) GetAnswer(_roundId *big.Int) (*big.Int, error) { + return _Aggregator.Contract.GetAnswer(&_Aggregator.CallOpts, _roundId) +} + +// GetAnswer is a free data retrieval call binding the contract method 0xb5ab58dc. +// +// Solidity: function getAnswer(uint256 _roundId) constant returns(int256) +func (_Aggregator *AggregatorCallerSession) GetAnswer(_roundId *big.Int) (*big.Int, error) { + return _Aggregator.Contract.GetAnswer(&_Aggregator.CallOpts, _roundId) +} + +// GetTimestamp is a free data retrieval call binding the contract method 0xb633620c. +// +// Solidity: function getTimestamp(uint256 _roundId) constant returns(uint256) +func (_Aggregator *AggregatorCaller) GetTimestamp(opts *bind.CallOpts, _roundId *big.Int) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _Aggregator.contract.Call(opts, out, "getTimestamp", _roundId) + return *ret0, err +} + +// GetTimestamp is a free data retrieval call binding the contract method 0xb633620c. +// +// Solidity: function getTimestamp(uint256 _roundId) constant returns(uint256) +func (_Aggregator *AggregatorSession) GetTimestamp(_roundId *big.Int) (*big.Int, error) { + return _Aggregator.Contract.GetTimestamp(&_Aggregator.CallOpts, _roundId) +} + +// GetTimestamp is a free data retrieval call binding the contract method 0xb633620c. +// +// Solidity: function getTimestamp(uint256 _roundId) constant returns(uint256) +func (_Aggregator *AggregatorCallerSession) GetTimestamp(_roundId *big.Int) (*big.Int, error) { + return _Aggregator.Contract.GetTimestamp(&_Aggregator.CallOpts, _roundId) +} + +// JobIds is a free data retrieval call binding the contract method 0x4162cc88. +// +// Solidity: function jobIds(uint256 ) constant returns(bytes32) +func (_Aggregator *AggregatorCaller) JobIds(opts *bind.CallOpts, arg0 *big.Int) ([32]byte, error) { + var ( + ret0 = new([32]byte) + ) + out := ret0 + err := _Aggregator.contract.Call(opts, out, "jobIds", arg0) + return *ret0, err +} + +// JobIds is a free data retrieval call binding the contract method 0x4162cc88. +// +// Solidity: function jobIds(uint256 ) constant returns(bytes32) +func (_Aggregator *AggregatorSession) JobIds(arg0 *big.Int) ([32]byte, error) { + return _Aggregator.Contract.JobIds(&_Aggregator.CallOpts, arg0) +} + +// JobIds is a free data retrieval call binding the contract method 0x4162cc88. +// +// Solidity: function jobIds(uint256 ) constant returns(bytes32) +func (_Aggregator *AggregatorCallerSession) JobIds(arg0 *big.Int) ([32]byte, error) { + return _Aggregator.Contract.JobIds(&_Aggregator.CallOpts, arg0) +} + +// LatestAnswer is a free data retrieval call binding the contract method 0x50d25bcd. +// +// Solidity: function latestAnswer() constant returns(int256) +func (_Aggregator *AggregatorCaller) LatestAnswer(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _Aggregator.contract.Call(opts, out, "latestAnswer") + return *ret0, err +} + +// LatestAnswer is a free data retrieval call binding the contract method 0x50d25bcd. +// +// Solidity: function latestAnswer() constant returns(int256) +func (_Aggregator *AggregatorSession) LatestAnswer() (*big.Int, error) { + return _Aggregator.Contract.LatestAnswer(&_Aggregator.CallOpts) +} + +// LatestAnswer is a free data retrieval call binding the contract method 0x50d25bcd. +// +// Solidity: function latestAnswer() constant returns(int256) +func (_Aggregator *AggregatorCallerSession) LatestAnswer() (*big.Int, error) { + return _Aggregator.Contract.LatestAnswer(&_Aggregator.CallOpts) +} + +// LatestRound is a free data retrieval call binding the contract method 0x668a0f02. +// +// Solidity: function latestRound() constant returns(uint256) +func (_Aggregator *AggregatorCaller) LatestRound(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _Aggregator.contract.Call(opts, out, "latestRound") + return *ret0, err +} + +// LatestRound is a free data retrieval call binding the contract method 0x668a0f02. +// +// Solidity: function latestRound() constant returns(uint256) +func (_Aggregator *AggregatorSession) LatestRound() (*big.Int, error) { + return _Aggregator.Contract.LatestRound(&_Aggregator.CallOpts) +} + +// LatestRound is a free data retrieval call binding the contract method 0x668a0f02. +// +// Solidity: function latestRound() constant returns(uint256) +func (_Aggregator *AggregatorCallerSession) LatestRound() (*big.Int, error) { + return _Aggregator.Contract.LatestRound(&_Aggregator.CallOpts) +} + +// LatestTimestamp is a free data retrieval call binding the contract method 0x8205bf6a. +// +// Solidity: function latestTimestamp() constant returns(uint256) +func (_Aggregator *AggregatorCaller) LatestTimestamp(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _Aggregator.contract.Call(opts, out, "latestTimestamp") + return *ret0, err +} + +// LatestTimestamp is a free data retrieval call binding the contract method 0x8205bf6a. +// +// Solidity: function latestTimestamp() constant returns(uint256) +func (_Aggregator *AggregatorSession) LatestTimestamp() (*big.Int, error) { + return _Aggregator.Contract.LatestTimestamp(&_Aggregator.CallOpts) +} + +// LatestTimestamp is a free data retrieval call binding the contract method 0x8205bf6a. +// +// Solidity: function latestTimestamp() constant returns(uint256) +func (_Aggregator *AggregatorCallerSession) LatestTimestamp() (*big.Int, error) { + return _Aggregator.Contract.LatestTimestamp(&_Aggregator.CallOpts) +} + +// MinimumResponses is a free data retrieval call binding the contract method 0x54bcd7ff. +// +// Solidity: function minimumResponses() constant returns(uint128) +func (_Aggregator *AggregatorCaller) MinimumResponses(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _Aggregator.contract.Call(opts, out, "minimumResponses") + return *ret0, err +} + +// MinimumResponses is a free data retrieval call binding the contract method 0x54bcd7ff. +// +// Solidity: function minimumResponses() constant returns(uint128) +func (_Aggregator *AggregatorSession) MinimumResponses() (*big.Int, error) { + return _Aggregator.Contract.MinimumResponses(&_Aggregator.CallOpts) +} + +// MinimumResponses is a free data retrieval call binding the contract method 0x54bcd7ff. +// +// Solidity: function minimumResponses() constant returns(uint128) +func (_Aggregator *AggregatorCallerSession) MinimumResponses() (*big.Int, error) { + return _Aggregator.Contract.MinimumResponses(&_Aggregator.CallOpts) +} + +// Oracles is a free data retrieval call binding the contract method 0x5b69a7d8. +// +// Solidity: function oracles(uint256 ) constant returns(address) +func (_Aggregator *AggregatorCaller) Oracles(opts *bind.CallOpts, arg0 *big.Int) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _Aggregator.contract.Call(opts, out, "oracles", arg0) + return *ret0, err +} + +// Oracles is a free data retrieval call binding the contract method 0x5b69a7d8. +// +// Solidity: function oracles(uint256 ) constant returns(address) +func (_Aggregator *AggregatorSession) Oracles(arg0 *big.Int) (common.Address, error) { + return _Aggregator.Contract.Oracles(&_Aggregator.CallOpts, arg0) +} + +// Oracles is a free data retrieval call binding the contract method 0x5b69a7d8. +// +// Solidity: function oracles(uint256 ) constant returns(address) +func (_Aggregator *AggregatorCallerSession) Oracles(arg0 *big.Int) (common.Address, error) { + return _Aggregator.Contract.Oracles(&_Aggregator.CallOpts, arg0) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() constant returns(address) +func (_Aggregator *AggregatorCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _Aggregator.contract.Call(opts, out, "owner") + return *ret0, err +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() constant returns(address) +func (_Aggregator *AggregatorSession) Owner() (common.Address, error) { + return _Aggregator.Contract.Owner(&_Aggregator.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() constant returns(address) +func (_Aggregator *AggregatorCallerSession) Owner() (common.Address, error) { + return _Aggregator.Contract.Owner(&_Aggregator.CallOpts) +} + +// PaymentAmount is a free data retrieval call binding the contract method 0xc35905c6. +// +// Solidity: function paymentAmount() constant returns(uint128) +func (_Aggregator *AggregatorCaller) PaymentAmount(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _Aggregator.contract.Call(opts, out, "paymentAmount") + return *ret0, err +} + +// PaymentAmount is a free data retrieval call binding the contract method 0xc35905c6. +// +// Solidity: function paymentAmount() constant returns(uint128) +func (_Aggregator *AggregatorSession) PaymentAmount() (*big.Int, error) { + return _Aggregator.Contract.PaymentAmount(&_Aggregator.CallOpts) +} + +// PaymentAmount is a free data retrieval call binding the contract method 0xc35905c6. +// +// Solidity: function paymentAmount() constant returns(uint128) +func (_Aggregator *AggregatorCallerSession) PaymentAmount() (*big.Int, error) { + return _Aggregator.Contract.PaymentAmount(&_Aggregator.CallOpts) +} + +// CancelRequest is a paid mutator transaction binding the contract method 0x33bfcdd8. +// +// Solidity: function cancelRequest(bytes32 _requestId, uint256 _payment, uint256 _expiration) returns() +func (_Aggregator *AggregatorTransactor) CancelRequest(opts *bind.TransactOpts, _requestId [32]byte, _payment *big.Int, _expiration *big.Int) (*types.Transaction, error) { + return _Aggregator.contract.Transact(opts, "cancelRequest", _requestId, _payment, _expiration) +} + +// CancelRequest is a paid mutator transaction binding the contract method 0x33bfcdd8. +// +// Solidity: function cancelRequest(bytes32 _requestId, uint256 _payment, uint256 _expiration) returns() +func (_Aggregator *AggregatorSession) CancelRequest(_requestId [32]byte, _payment *big.Int, _expiration *big.Int) (*types.Transaction, error) { + return _Aggregator.Contract.CancelRequest(&_Aggregator.TransactOpts, _requestId, _payment, _expiration) +} + +// CancelRequest is a paid mutator transaction binding the contract method 0x33bfcdd8. +// +// Solidity: function cancelRequest(bytes32 _requestId, uint256 _payment, uint256 _expiration) returns() +func (_Aggregator *AggregatorTransactorSession) CancelRequest(_requestId [32]byte, _payment *big.Int, _expiration *big.Int) (*types.Transaction, error) { + return _Aggregator.Contract.CancelRequest(&_Aggregator.TransactOpts, _requestId, _payment, _expiration) +} + +// ChainlinkCallback is a paid mutator transaction binding the contract method 0x6a9705b4. +// +// Solidity: function chainlinkCallback(bytes32 _clRequestId, int256 _response) returns() +func (_Aggregator *AggregatorTransactor) ChainlinkCallback(opts *bind.TransactOpts, _clRequestId [32]byte, _response *big.Int) (*types.Transaction, error) { + return _Aggregator.contract.Transact(opts, "chainlinkCallback", _clRequestId, _response) +} + +// ChainlinkCallback is a paid mutator transaction binding the contract method 0x6a9705b4. +// +// Solidity: function chainlinkCallback(bytes32 _clRequestId, int256 _response) returns() +func (_Aggregator *AggregatorSession) ChainlinkCallback(_clRequestId [32]byte, _response *big.Int) (*types.Transaction, error) { + return _Aggregator.Contract.ChainlinkCallback(&_Aggregator.TransactOpts, _clRequestId, _response) +} + +// ChainlinkCallback is a paid mutator transaction binding the contract method 0x6a9705b4. +// +// Solidity: function chainlinkCallback(bytes32 _clRequestId, int256 _response) returns() +func (_Aggregator *AggregatorTransactorSession) ChainlinkCallback(_clRequestId [32]byte, _response *big.Int) (*types.Transaction, error) { + return _Aggregator.Contract.ChainlinkCallback(&_Aggregator.TransactOpts, _clRequestId, _response) +} + +// Destroy is a paid mutator transaction binding the contract method 0x83197ef0. +// +// Solidity: function destroy() returns() +func (_Aggregator *AggregatorTransactor) Destroy(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Aggregator.contract.Transact(opts, "destroy") +} + +// Destroy is a paid mutator transaction binding the contract method 0x83197ef0. +// +// Solidity: function destroy() returns() +func (_Aggregator *AggregatorSession) Destroy() (*types.Transaction, error) { + return _Aggregator.Contract.Destroy(&_Aggregator.TransactOpts) +} + +// Destroy is a paid mutator transaction binding the contract method 0x83197ef0. +// +// Solidity: function destroy() returns() +func (_Aggregator *AggregatorTransactorSession) Destroy() (*types.Transaction, error) { + return _Aggregator.Contract.Destroy(&_Aggregator.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Aggregator *AggregatorTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Aggregator.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Aggregator *AggregatorSession) RenounceOwnership() (*types.Transaction, error) { + return _Aggregator.Contract.RenounceOwnership(&_Aggregator.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Aggregator *AggregatorTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _Aggregator.Contract.RenounceOwnership(&_Aggregator.TransactOpts) +} + +// RequestRateUpdate is a paid mutator transaction binding the contract method 0xdaa6d556. +// +// Solidity: function requestRateUpdate() returns() +func (_Aggregator *AggregatorTransactor) RequestRateUpdate(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Aggregator.contract.Transact(opts, "requestRateUpdate") +} + +// RequestRateUpdate is a paid mutator transaction binding the contract method 0xdaa6d556. +// +// Solidity: function requestRateUpdate() returns() +func (_Aggregator *AggregatorSession) RequestRateUpdate() (*types.Transaction, error) { + return _Aggregator.Contract.RequestRateUpdate(&_Aggregator.TransactOpts) +} + +// RequestRateUpdate is a paid mutator transaction binding the contract method 0xdaa6d556. +// +// Solidity: function requestRateUpdate() returns() +func (_Aggregator *AggregatorTransactorSession) RequestRateUpdate() (*types.Transaction, error) { + return _Aggregator.Contract.RequestRateUpdate(&_Aggregator.TransactOpts) +} + +// SetAuthorization is a paid mutator transaction binding the contract method 0xeecea000. +// +// Solidity: function setAuthorization(address _requester, bool _allowed) returns() +func (_Aggregator *AggregatorTransactor) SetAuthorization(opts *bind.TransactOpts, _requester common.Address, _allowed bool) (*types.Transaction, error) { + return _Aggregator.contract.Transact(opts, "setAuthorization", _requester, _allowed) +} + +// SetAuthorization is a paid mutator transaction binding the contract method 0xeecea000. +// +// Solidity: function setAuthorization(address _requester, bool _allowed) returns() +func (_Aggregator *AggregatorSession) SetAuthorization(_requester common.Address, _allowed bool) (*types.Transaction, error) { + return _Aggregator.Contract.SetAuthorization(&_Aggregator.TransactOpts, _requester, _allowed) +} + +// SetAuthorization is a paid mutator transaction binding the contract method 0xeecea000. +// +// Solidity: function setAuthorization(address _requester, bool _allowed) returns() +func (_Aggregator *AggregatorTransactorSession) SetAuthorization(_requester common.Address, _allowed bool) (*types.Transaction, error) { + return _Aggregator.Contract.SetAuthorization(&_Aggregator.TransactOpts, _requester, _allowed) +} + +// TransferLINK is a paid mutator transaction binding the contract method 0x5cd9b90b. +// +// Solidity: function transferLINK(address _recipient, uint256 _amount) returns() +func (_Aggregator *AggregatorTransactor) TransferLINK(opts *bind.TransactOpts, _recipient common.Address, _amount *big.Int) (*types.Transaction, error) { + return _Aggregator.contract.Transact(opts, "transferLINK", _recipient, _amount) +} + +// TransferLINK is a paid mutator transaction binding the contract method 0x5cd9b90b. +// +// Solidity: function transferLINK(address _recipient, uint256 _amount) returns() +func (_Aggregator *AggregatorSession) TransferLINK(_recipient common.Address, _amount *big.Int) (*types.Transaction, error) { + return _Aggregator.Contract.TransferLINK(&_Aggregator.TransactOpts, _recipient, _amount) +} + +// TransferLINK is a paid mutator transaction binding the contract method 0x5cd9b90b. +// +// Solidity: function transferLINK(address _recipient, uint256 _amount) returns() +func (_Aggregator *AggregatorTransactorSession) TransferLINK(_recipient common.Address, _amount *big.Int) (*types.Transaction, error) { + return _Aggregator.Contract.TransferLINK(&_Aggregator.TransactOpts, _recipient, _amount) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address _newOwner) returns() +func (_Aggregator *AggregatorTransactor) TransferOwnership(opts *bind.TransactOpts, _newOwner common.Address) (*types.Transaction, error) { + return _Aggregator.contract.Transact(opts, "transferOwnership", _newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address _newOwner) returns() +func (_Aggregator *AggregatorSession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error) { + return _Aggregator.Contract.TransferOwnership(&_Aggregator.TransactOpts, _newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address _newOwner) returns() +func (_Aggregator *AggregatorTransactorSession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error) { + return _Aggregator.Contract.TransferOwnership(&_Aggregator.TransactOpts, _newOwner) +} + +// UpdateRequestDetails is a paid mutator transaction binding the contract method 0x78a66674. +// +// Solidity: function updateRequestDetails(uint128 _paymentAmount, uint128 _minimumResponses, address[] _oracles, bytes32[] _jobIds) returns() +func (_Aggregator *AggregatorTransactor) UpdateRequestDetails(opts *bind.TransactOpts, _paymentAmount *big.Int, _minimumResponses *big.Int, _oracles []common.Address, _jobIds [][32]byte) (*types.Transaction, error) { + return _Aggregator.contract.Transact(opts, "updateRequestDetails", _paymentAmount, _minimumResponses, _oracles, _jobIds) +} + +// UpdateRequestDetails is a paid mutator transaction binding the contract method 0x78a66674. +// +// Solidity: function updateRequestDetails(uint128 _paymentAmount, uint128 _minimumResponses, address[] _oracles, bytes32[] _jobIds) returns() +func (_Aggregator *AggregatorSession) UpdateRequestDetails(_paymentAmount *big.Int, _minimumResponses *big.Int, _oracles []common.Address, _jobIds [][32]byte) (*types.Transaction, error) { + return _Aggregator.Contract.UpdateRequestDetails(&_Aggregator.TransactOpts, _paymentAmount, _minimumResponses, _oracles, _jobIds) +} + +// UpdateRequestDetails is a paid mutator transaction binding the contract method 0x78a66674. +// +// Solidity: function updateRequestDetails(uint128 _paymentAmount, uint128 _minimumResponses, address[] _oracles, bytes32[] _jobIds) returns() +func (_Aggregator *AggregatorTransactorSession) UpdateRequestDetails(_paymentAmount *big.Int, _minimumResponses *big.Int, _oracles []common.Address, _jobIds [][32]byte) (*types.Transaction, error) { + return _Aggregator.Contract.UpdateRequestDetails(&_Aggregator.TransactOpts, _paymentAmount, _minimumResponses, _oracles, _jobIds) +} + +// AggregatorAnswerUpdatedIterator is returned from FilterAnswerUpdated and is used to iterate over the raw logs and unpacked data for AnswerUpdated events raised by the Aggregator contract. +type AggregatorAnswerUpdatedIterator struct { + Event *AggregatorAnswerUpdated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *AggregatorAnswerUpdatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(AggregatorAnswerUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(AggregatorAnswerUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *AggregatorAnswerUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AggregatorAnswerUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AggregatorAnswerUpdated represents a AnswerUpdated event raised by the Aggregator contract. +type AggregatorAnswerUpdated struct { + Current *big.Int + RoundId *big.Int + Timestamp *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAnswerUpdated is a free log retrieval operation binding the contract event 0x0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f. +// +// Solidity: event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 timestamp) +func (_Aggregator *AggregatorFilterer) FilterAnswerUpdated(opts *bind.FilterOpts, current []*big.Int, roundId []*big.Int) (*AggregatorAnswerUpdatedIterator, error) { + + var currentRule []interface{} + for _, currentItem := range current { + currentRule = append(currentRule, currentItem) + } + var roundIdRule []interface{} + for _, roundIdItem := range roundId { + roundIdRule = append(roundIdRule, roundIdItem) + } + + logs, sub, err := _Aggregator.contract.FilterLogs(opts, "AnswerUpdated", currentRule, roundIdRule) + if err != nil { + return nil, err + } + return &AggregatorAnswerUpdatedIterator{contract: _Aggregator.contract, event: "AnswerUpdated", logs: logs, sub: sub}, nil +} + +// WatchAnswerUpdated is a free log subscription operation binding the contract event 0x0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f. +// +// Solidity: event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 timestamp) +func (_Aggregator *AggregatorFilterer) WatchAnswerUpdated(opts *bind.WatchOpts, sink chan<- *AggregatorAnswerUpdated, current []*big.Int, roundId []*big.Int) (event.Subscription, error) { + + var currentRule []interface{} + for _, currentItem := range current { + currentRule = append(currentRule, currentItem) + } + var roundIdRule []interface{} + for _, roundIdItem := range roundId { + roundIdRule = append(roundIdRule, roundIdItem) + } + + logs, sub, err := _Aggregator.contract.WatchLogs(opts, "AnswerUpdated", currentRule, roundIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(AggregatorAnswerUpdated) + if err := _Aggregator.contract.UnpackLog(event, "AnswerUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseAnswerUpdated is a log parse operation binding the contract event 0x0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f. +// +// Solidity: event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 timestamp) +func (_Aggregator *AggregatorFilterer) ParseAnswerUpdated(log types.Log) (*AggregatorAnswerUpdated, error) { + event := new(AggregatorAnswerUpdated) + if err := _Aggregator.contract.UnpackLog(event, "AnswerUpdated", log); err != nil { + return nil, err + } + return event, nil +} + +// AggregatorChainlinkCancelledIterator is returned from FilterChainlinkCancelled and is used to iterate over the raw logs and unpacked data for ChainlinkCancelled events raised by the Aggregator contract. +type AggregatorChainlinkCancelledIterator struct { + Event *AggregatorChainlinkCancelled // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *AggregatorChainlinkCancelledIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(AggregatorChainlinkCancelled) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(AggregatorChainlinkCancelled) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *AggregatorChainlinkCancelledIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AggregatorChainlinkCancelledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AggregatorChainlinkCancelled represents a ChainlinkCancelled event raised by the Aggregator contract. +type AggregatorChainlinkCancelled struct { + Id [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterChainlinkCancelled is a free log retrieval operation binding the contract event 0xe1fe3afa0f7f761ff0a8b89086790efd5140d2907ebd5b7ff6bfcb5e075fd4c5. +// +// Solidity: event ChainlinkCancelled(bytes32 indexed id) +func (_Aggregator *AggregatorFilterer) FilterChainlinkCancelled(opts *bind.FilterOpts, id [][32]byte) (*AggregatorChainlinkCancelledIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _Aggregator.contract.FilterLogs(opts, "ChainlinkCancelled", idRule) + if err != nil { + return nil, err + } + return &AggregatorChainlinkCancelledIterator{contract: _Aggregator.contract, event: "ChainlinkCancelled", logs: logs, sub: sub}, nil +} + +// WatchChainlinkCancelled is a free log subscription operation binding the contract event 0xe1fe3afa0f7f761ff0a8b89086790efd5140d2907ebd5b7ff6bfcb5e075fd4c5. +// +// Solidity: event ChainlinkCancelled(bytes32 indexed id) +func (_Aggregator *AggregatorFilterer) WatchChainlinkCancelled(opts *bind.WatchOpts, sink chan<- *AggregatorChainlinkCancelled, id [][32]byte) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _Aggregator.contract.WatchLogs(opts, "ChainlinkCancelled", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(AggregatorChainlinkCancelled) + if err := _Aggregator.contract.UnpackLog(event, "ChainlinkCancelled", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseChainlinkCancelled is a log parse operation binding the contract event 0xe1fe3afa0f7f761ff0a8b89086790efd5140d2907ebd5b7ff6bfcb5e075fd4c5. +// +// Solidity: event ChainlinkCancelled(bytes32 indexed id) +func (_Aggregator *AggregatorFilterer) ParseChainlinkCancelled(log types.Log) (*AggregatorChainlinkCancelled, error) { + event := new(AggregatorChainlinkCancelled) + if err := _Aggregator.contract.UnpackLog(event, "ChainlinkCancelled", log); err != nil { + return nil, err + } + return event, nil +} + +// AggregatorChainlinkFulfilledIterator is returned from FilterChainlinkFulfilled and is used to iterate over the raw logs and unpacked data for ChainlinkFulfilled events raised by the Aggregator contract. +type AggregatorChainlinkFulfilledIterator struct { + Event *AggregatorChainlinkFulfilled // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *AggregatorChainlinkFulfilledIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(AggregatorChainlinkFulfilled) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(AggregatorChainlinkFulfilled) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *AggregatorChainlinkFulfilledIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AggregatorChainlinkFulfilledIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AggregatorChainlinkFulfilled represents a ChainlinkFulfilled event raised by the Aggregator contract. +type AggregatorChainlinkFulfilled struct { + Id [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterChainlinkFulfilled is a free log retrieval operation binding the contract event 0x7cc135e0cebb02c3480ae5d74d377283180a2601f8f644edf7987b009316c63a. +// +// Solidity: event ChainlinkFulfilled(bytes32 indexed id) +func (_Aggregator *AggregatorFilterer) FilterChainlinkFulfilled(opts *bind.FilterOpts, id [][32]byte) (*AggregatorChainlinkFulfilledIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _Aggregator.contract.FilterLogs(opts, "ChainlinkFulfilled", idRule) + if err != nil { + return nil, err + } + return &AggregatorChainlinkFulfilledIterator{contract: _Aggregator.contract, event: "ChainlinkFulfilled", logs: logs, sub: sub}, nil +} + +// WatchChainlinkFulfilled is a free log subscription operation binding the contract event 0x7cc135e0cebb02c3480ae5d74d377283180a2601f8f644edf7987b009316c63a. +// +// Solidity: event ChainlinkFulfilled(bytes32 indexed id) +func (_Aggregator *AggregatorFilterer) WatchChainlinkFulfilled(opts *bind.WatchOpts, sink chan<- *AggregatorChainlinkFulfilled, id [][32]byte) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _Aggregator.contract.WatchLogs(opts, "ChainlinkFulfilled", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(AggregatorChainlinkFulfilled) + if err := _Aggregator.contract.UnpackLog(event, "ChainlinkFulfilled", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseChainlinkFulfilled is a log parse operation binding the contract event 0x7cc135e0cebb02c3480ae5d74d377283180a2601f8f644edf7987b009316c63a. +// +// Solidity: event ChainlinkFulfilled(bytes32 indexed id) +func (_Aggregator *AggregatorFilterer) ParseChainlinkFulfilled(log types.Log) (*AggregatorChainlinkFulfilled, error) { + event := new(AggregatorChainlinkFulfilled) + if err := _Aggregator.contract.UnpackLog(event, "ChainlinkFulfilled", log); err != nil { + return nil, err + } + return event, nil +} + +// AggregatorChainlinkRequestedIterator is returned from FilterChainlinkRequested and is used to iterate over the raw logs and unpacked data for ChainlinkRequested events raised by the Aggregator contract. +type AggregatorChainlinkRequestedIterator struct { + Event *AggregatorChainlinkRequested // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *AggregatorChainlinkRequestedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(AggregatorChainlinkRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(AggregatorChainlinkRequested) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *AggregatorChainlinkRequestedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AggregatorChainlinkRequestedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AggregatorChainlinkRequested represents a ChainlinkRequested event raised by the Aggregator contract. +type AggregatorChainlinkRequested struct { + Id [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterChainlinkRequested is a free log retrieval operation binding the contract event 0xb5e6e01e79f91267dc17b4e6314d5d4d03593d2ceee0fbb452b750bd70ea5af9. +// +// Solidity: event ChainlinkRequested(bytes32 indexed id) +func (_Aggregator *AggregatorFilterer) FilterChainlinkRequested(opts *bind.FilterOpts, id [][32]byte) (*AggregatorChainlinkRequestedIterator, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _Aggregator.contract.FilterLogs(opts, "ChainlinkRequested", idRule) + if err != nil { + return nil, err + } + return &AggregatorChainlinkRequestedIterator{contract: _Aggregator.contract, event: "ChainlinkRequested", logs: logs, sub: sub}, nil +} + +// WatchChainlinkRequested is a free log subscription operation binding the contract event 0xb5e6e01e79f91267dc17b4e6314d5d4d03593d2ceee0fbb452b750bd70ea5af9. +// +// Solidity: event ChainlinkRequested(bytes32 indexed id) +func (_Aggregator *AggregatorFilterer) WatchChainlinkRequested(opts *bind.WatchOpts, sink chan<- *AggregatorChainlinkRequested, id [][32]byte) (event.Subscription, error) { + + var idRule []interface{} + for _, idItem := range id { + idRule = append(idRule, idItem) + } + + logs, sub, err := _Aggregator.contract.WatchLogs(opts, "ChainlinkRequested", idRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(AggregatorChainlinkRequested) + if err := _Aggregator.contract.UnpackLog(event, "ChainlinkRequested", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseChainlinkRequested is a log parse operation binding the contract event 0xb5e6e01e79f91267dc17b4e6314d5d4d03593d2ceee0fbb452b750bd70ea5af9. +// +// Solidity: event ChainlinkRequested(bytes32 indexed id) +func (_Aggregator *AggregatorFilterer) ParseChainlinkRequested(log types.Log) (*AggregatorChainlinkRequested, error) { + event := new(AggregatorChainlinkRequested) + if err := _Aggregator.contract.UnpackLog(event, "ChainlinkRequested", log); err != nil { + return nil, err + } + return event, nil +} + +// AggregatorNewRoundIterator is returned from FilterNewRound and is used to iterate over the raw logs and unpacked data for NewRound events raised by the Aggregator contract. +type AggregatorNewRoundIterator struct { + Event *AggregatorNewRound // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *AggregatorNewRoundIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(AggregatorNewRound) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(AggregatorNewRound) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *AggregatorNewRoundIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AggregatorNewRoundIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AggregatorNewRound represents a NewRound event raised by the Aggregator contract. +type AggregatorNewRound struct { + RoundId *big.Int + StartedBy common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterNewRound is a free log retrieval operation binding the contract event 0xc3c45d1924f55369653f407ee9f095309d1e687b2c0011b1f709042d4f457e17. +// +// Solidity: event NewRound(uint256 indexed roundId, address indexed startedBy) +func (_Aggregator *AggregatorFilterer) FilterNewRound(opts *bind.FilterOpts, roundId []*big.Int, startedBy []common.Address) (*AggregatorNewRoundIterator, error) { + + var roundIdRule []interface{} + for _, roundIdItem := range roundId { + roundIdRule = append(roundIdRule, roundIdItem) + } + var startedByRule []interface{} + for _, startedByItem := range startedBy { + startedByRule = append(startedByRule, startedByItem) + } + + logs, sub, err := _Aggregator.contract.FilterLogs(opts, "NewRound", roundIdRule, startedByRule) + if err != nil { + return nil, err + } + return &AggregatorNewRoundIterator{contract: _Aggregator.contract, event: "NewRound", logs: logs, sub: sub}, nil +} + +// WatchNewRound is a free log subscription operation binding the contract event 0xc3c45d1924f55369653f407ee9f095309d1e687b2c0011b1f709042d4f457e17. +// +// Solidity: event NewRound(uint256 indexed roundId, address indexed startedBy) +func (_Aggregator *AggregatorFilterer) WatchNewRound(opts *bind.WatchOpts, sink chan<- *AggregatorNewRound, roundId []*big.Int, startedBy []common.Address) (event.Subscription, error) { + + var roundIdRule []interface{} + for _, roundIdItem := range roundId { + roundIdRule = append(roundIdRule, roundIdItem) + } + var startedByRule []interface{} + for _, startedByItem := range startedBy { + startedByRule = append(startedByRule, startedByItem) + } + + logs, sub, err := _Aggregator.contract.WatchLogs(opts, "NewRound", roundIdRule, startedByRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(AggregatorNewRound) + if err := _Aggregator.contract.UnpackLog(event, "NewRound", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseNewRound is a log parse operation binding the contract event 0xc3c45d1924f55369653f407ee9f095309d1e687b2c0011b1f709042d4f457e17. +// +// Solidity: event NewRound(uint256 indexed roundId, address indexed startedBy) +func (_Aggregator *AggregatorFilterer) ParseNewRound(log types.Log) (*AggregatorNewRound, error) { + event := new(AggregatorNewRound) + if err := _Aggregator.contract.UnpackLog(event, "NewRound", log); err != nil { + return nil, err + } + return event, nil +} + +// AggregatorOwnershipRenouncedIterator is returned from FilterOwnershipRenounced and is used to iterate over the raw logs and unpacked data for OwnershipRenounced events raised by the Aggregator contract. +type AggregatorOwnershipRenouncedIterator struct { + Event *AggregatorOwnershipRenounced // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *AggregatorOwnershipRenouncedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(AggregatorOwnershipRenounced) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(AggregatorOwnershipRenounced) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *AggregatorOwnershipRenouncedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AggregatorOwnershipRenouncedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AggregatorOwnershipRenounced represents a OwnershipRenounced event raised by the Aggregator contract. +type AggregatorOwnershipRenounced struct { + PreviousOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipRenounced is a free log retrieval operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_Aggregator *AggregatorFilterer) FilterOwnershipRenounced(opts *bind.FilterOpts, previousOwner []common.Address) (*AggregatorOwnershipRenouncedIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + + logs, sub, err := _Aggregator.contract.FilterLogs(opts, "OwnershipRenounced", previousOwnerRule) + if err != nil { + return nil, err + } + return &AggregatorOwnershipRenouncedIterator{contract: _Aggregator.contract, event: "OwnershipRenounced", logs: logs, sub: sub}, nil +} + +// WatchOwnershipRenounced is a free log subscription operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_Aggregator *AggregatorFilterer) WatchOwnershipRenounced(opts *bind.WatchOpts, sink chan<- *AggregatorOwnershipRenounced, previousOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + + logs, sub, err := _Aggregator.contract.WatchLogs(opts, "OwnershipRenounced", previousOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(AggregatorOwnershipRenounced) + if err := _Aggregator.contract.UnpackLog(event, "OwnershipRenounced", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipRenounced is a log parse operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_Aggregator *AggregatorFilterer) ParseOwnershipRenounced(log types.Log) (*AggregatorOwnershipRenounced, error) { + event := new(AggregatorOwnershipRenounced) + if err := _Aggregator.contract.UnpackLog(event, "OwnershipRenounced", log); err != nil { + return nil, err + } + return event, nil +} + +// AggregatorOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Aggregator contract. +type AggregatorOwnershipTransferredIterator struct { + Event *AggregatorOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *AggregatorOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(AggregatorOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(AggregatorOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *AggregatorOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AggregatorOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AggregatorOwnershipTransferred represents a OwnershipTransferred event raised by the Aggregator contract. +type AggregatorOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Aggregator *AggregatorFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*AggregatorOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Aggregator.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &AggregatorOwnershipTransferredIterator{contract: _Aggregator.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Aggregator *AggregatorFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *AggregatorOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Aggregator.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(AggregatorOwnershipTransferred) + if err := _Aggregator.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Aggregator *AggregatorFilterer) ParseOwnershipTransferred(log types.Log) (*AggregatorOwnershipTransferred, error) { + event := new(AggregatorOwnershipTransferred) + if err := _Aggregator.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + return event, nil +} + +// AggregatorResponseReceivedIterator is returned from FilterResponseReceived and is used to iterate over the raw logs and unpacked data for ResponseReceived events raised by the Aggregator contract. +type AggregatorResponseReceivedIterator struct { + Event *AggregatorResponseReceived // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *AggregatorResponseReceivedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(AggregatorResponseReceived) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(AggregatorResponseReceived) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *AggregatorResponseReceivedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *AggregatorResponseReceivedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// AggregatorResponseReceived represents a ResponseReceived event raised by the Aggregator contract. +type AggregatorResponseReceived struct { + Response *big.Int + AnswerId *big.Int + Sender common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterResponseReceived is a free log retrieval operation binding the contract event 0xb51168059c83c860caf5b830c5d2e64c2172c6fb2fe9f25447d9838e18d93b60. +// +// Solidity: event ResponseReceived(int256 indexed response, uint256 indexed answerId, address indexed sender) +func (_Aggregator *AggregatorFilterer) FilterResponseReceived(opts *bind.FilterOpts, response []*big.Int, answerId []*big.Int, sender []common.Address) (*AggregatorResponseReceivedIterator, error) { + + var responseRule []interface{} + for _, responseItem := range response { + responseRule = append(responseRule, responseItem) + } + var answerIdRule []interface{} + for _, answerIdItem := range answerId { + answerIdRule = append(answerIdRule, answerIdItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _Aggregator.contract.FilterLogs(opts, "ResponseReceived", responseRule, answerIdRule, senderRule) + if err != nil { + return nil, err + } + return &AggregatorResponseReceivedIterator{contract: _Aggregator.contract, event: "ResponseReceived", logs: logs, sub: sub}, nil +} + +// WatchResponseReceived is a free log subscription operation binding the contract event 0xb51168059c83c860caf5b830c5d2e64c2172c6fb2fe9f25447d9838e18d93b60. +// +// Solidity: event ResponseReceived(int256 indexed response, uint256 indexed answerId, address indexed sender) +func (_Aggregator *AggregatorFilterer) WatchResponseReceived(opts *bind.WatchOpts, sink chan<- *AggregatorResponseReceived, response []*big.Int, answerId []*big.Int, sender []common.Address) (event.Subscription, error) { + + var responseRule []interface{} + for _, responseItem := range response { + responseRule = append(responseRule, responseItem) + } + var answerIdRule []interface{} + for _, answerIdItem := range answerId { + answerIdRule = append(answerIdRule, answerIdItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _Aggregator.contract.WatchLogs(opts, "ResponseReceived", responseRule, answerIdRule, senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(AggregatorResponseReceived) + if err := _Aggregator.contract.UnpackLog(event, "ResponseReceived", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseResponseReceived is a log parse operation binding the contract event 0xb51168059c83c860caf5b830c5d2e64c2172c6fb2fe9f25447d9838e18d93b60. +// +// Solidity: event ResponseReceived(int256 indexed response, uint256 indexed answerId, address indexed sender) +func (_Aggregator *AggregatorFilterer) ParseResponseReceived(log types.Log) (*AggregatorResponseReceived, error) { + event := new(AggregatorResponseReceived) + if err := _Aggregator.contract.UnpackLog(event, "ResponseReceived", log); err != nil { + return nil, err + } + return event, nil +} diff --git a/abi/link.go b/abi/link.go new file mode 100644 index 0000000..6c405f1 --- /dev/null +++ b/abi/link.go @@ -0,0 +1,762 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package abi + +import ( + "math/big" + "strings" + + 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 ( + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = abi.U256 + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// ERCABI is the input ABI used to generate the binding from. +const ERCABI = "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"},{\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"transferAndCall\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseApproval\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseApproval\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}]" + +// ERC is an auto generated Go binding around an Ethereum contract. +type ERC struct { + ERCCaller // Read-only binding to the contract + ERCTransactor // Write-only binding to the contract + ERCFilterer // Log filterer for contract events +} + +// ERCCaller is an auto generated read-only Go binding around an Ethereum contract. +type ERCCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERCTransactor is an auto generated write-only Go binding around an Ethereum contract. +type ERCTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERCFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type ERCFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// ERCSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type ERCSession struct { + Contract *ERC // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ERCCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type ERCCallerSession struct { + Contract *ERCCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// ERCTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type ERCTransactorSession struct { + Contract *ERCTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// ERCRaw is an auto generated low-level Go binding around an Ethereum contract. +type ERCRaw struct { + Contract *ERC // Generic contract binding to access the raw methods on +} + +// ERCCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type ERCCallerRaw struct { + Contract *ERCCaller // Generic read-only contract binding to access the raw methods on +} + +// ERCTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type ERCTransactorRaw struct { + Contract *ERCTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewERC creates a new instance of ERC, bound to a specific deployed contract. +func NewERC(address common.Address, backend bind.ContractBackend) (*ERC, error) { + contract, err := bindERC(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &ERC{ERCCaller: ERCCaller{contract: contract}, ERCTransactor: ERCTransactor{contract: contract}, ERCFilterer: ERCFilterer{contract: contract}}, nil +} + +// NewERCCaller creates a new read-only instance of ERC, bound to a specific deployed contract. +func NewERCCaller(address common.Address, caller bind.ContractCaller) (*ERCCaller, error) { + contract, err := bindERC(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &ERCCaller{contract: contract}, nil +} + +// NewERCTransactor creates a new write-only instance of ERC, bound to a specific deployed contract. +func NewERCTransactor(address common.Address, transactor bind.ContractTransactor) (*ERCTransactor, error) { + contract, err := bindERC(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &ERCTransactor{contract: contract}, nil +} + +// NewERCFilterer creates a new log filterer instance of ERC, bound to a specific deployed contract. +func NewERCFilterer(address common.Address, filterer bind.ContractFilterer) (*ERCFilterer, error) { + contract, err := bindERC(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &ERCFilterer{contract: contract}, nil +} + +// bindERC binds a generic wrapper to an already deployed contract. +func bindERC(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(ERCABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ERC *ERCRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _ERC.Contract.ERCCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ERC *ERCRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC.Contract.ERCTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC *ERCRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC.Contract.ERCTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_ERC *ERCCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _ERC.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_ERC *ERCTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _ERC.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_ERC *ERCTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _ERC.Contract.contract.Transact(opts, method, params...) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address _owner, address _spender) constant returns(uint256 remaining) +func (_ERC *ERCCaller) Allowance(opts *bind.CallOpts, _owner common.Address, _spender common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _ERC.contract.Call(opts, out, "allowance", _owner, _spender) + return *ret0, err +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address _owner, address _spender) constant returns(uint256 remaining) +func (_ERC *ERCSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) { + return _ERC.Contract.Allowance(&_ERC.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 remaining) +func (_ERC *ERCCallerSession) Allowance(_owner common.Address, _spender common.Address) (*big.Int, error) { + return _ERC.Contract.Allowance(&_ERC.CallOpts, _owner, _spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _owner) constant returns(uint256 balance) +func (_ERC *ERCCaller) BalanceOf(opts *bind.CallOpts, _owner common.Address) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _ERC.contract.Call(opts, out, "balanceOf", _owner) + return *ret0, err +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _owner) constant returns(uint256 balance) +func (_ERC *ERCSession) BalanceOf(_owner common.Address) (*big.Int, error) { + return _ERC.Contract.BalanceOf(&_ERC.CallOpts, _owner) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address _owner) constant returns(uint256 balance) +func (_ERC *ERCCallerSession) BalanceOf(_owner common.Address) (*big.Int, error) { + return _ERC.Contract.BalanceOf(&_ERC.CallOpts, _owner) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() constant returns(uint8) +func (_ERC *ERCCaller) Decimals(opts *bind.CallOpts) (uint8, error) { + var ( + ret0 = new(uint8) + ) + out := ret0 + err := _ERC.contract.Call(opts, out, "decimals") + return *ret0, err +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() constant returns(uint8) +func (_ERC *ERCSession) Decimals() (uint8, error) { + return _ERC.Contract.Decimals(&_ERC.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() constant returns(uint8) +func (_ERC *ERCCallerSession) Decimals() (uint8, error) { + return _ERC.Contract.Decimals(&_ERC.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() constant returns(string) +func (_ERC *ERCCaller) Name(opts *bind.CallOpts) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _ERC.contract.Call(opts, out, "name") + return *ret0, err +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() constant returns(string) +func (_ERC *ERCSession) Name() (string, error) { + return _ERC.Contract.Name(&_ERC.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() constant returns(string) +func (_ERC *ERCCallerSession) Name() (string, error) { + return _ERC.Contract.Name(&_ERC.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() constant returns(string) +func (_ERC *ERCCaller) Symbol(opts *bind.CallOpts) (string, error) { + var ( + ret0 = new(string) + ) + out := ret0 + err := _ERC.contract.Call(opts, out, "symbol") + return *ret0, err +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() constant returns(string) +func (_ERC *ERCSession) Symbol() (string, error) { + return _ERC.Contract.Symbol(&_ERC.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() constant returns(string) +func (_ERC *ERCCallerSession) Symbol() (string, error) { + return _ERC.Contract.Symbol(&_ERC.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() constant returns(uint256) +func (_ERC *ERCCaller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _ERC.contract.Call(opts, out, "totalSupply") + return *ret0, err +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() constant returns(uint256) +func (_ERC *ERCSession) TotalSupply() (*big.Int, error) { + return _ERC.Contract.TotalSupply(&_ERC.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() constant returns(uint256) +func (_ERC *ERCCallerSession) TotalSupply() (*big.Int, error) { + return _ERC.Contract.TotalSupply(&_ERC.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address _spender, uint256 _value) returns(bool) +func (_ERC *ERCTransactor) Approve(opts *bind.TransactOpts, _spender common.Address, _value *big.Int) (*types.Transaction, error) { + return _ERC.contract.Transact(opts, "approve", _spender, _value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address _spender, uint256 _value) returns(bool) +func (_ERC *ERCSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) { + return _ERC.Contract.Approve(&_ERC.TransactOpts, _spender, _value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address _spender, uint256 _value) returns(bool) +func (_ERC *ERCTransactorSession) Approve(_spender common.Address, _value *big.Int) (*types.Transaction, error) { + return _ERC.Contract.Approve(&_ERC.TransactOpts, _spender, _value) +} + +// DecreaseApproval is a paid mutator transaction binding the contract method 0x66188463. +// +// Solidity: function decreaseApproval(address _spender, uint256 _subtractedValue) returns(bool success) +func (_ERC *ERCTransactor) DecreaseApproval(opts *bind.TransactOpts, _spender common.Address, _subtractedValue *big.Int) (*types.Transaction, error) { + return _ERC.contract.Transact(opts, "decreaseApproval", _spender, _subtractedValue) +} + +// DecreaseApproval is a paid mutator transaction binding the contract method 0x66188463. +// +// Solidity: function decreaseApproval(address _spender, uint256 _subtractedValue) returns(bool success) +func (_ERC *ERCSession) DecreaseApproval(_spender common.Address, _subtractedValue *big.Int) (*types.Transaction, error) { + return _ERC.Contract.DecreaseApproval(&_ERC.TransactOpts, _spender, _subtractedValue) +} + +// DecreaseApproval is a paid mutator transaction binding the contract method 0x66188463. +// +// Solidity: function decreaseApproval(address _spender, uint256 _subtractedValue) returns(bool success) +func (_ERC *ERCTransactorSession) DecreaseApproval(_spender common.Address, _subtractedValue *big.Int) (*types.Transaction, error) { + return _ERC.Contract.DecreaseApproval(&_ERC.TransactOpts, _spender, _subtractedValue) +} + +// IncreaseApproval is a paid mutator transaction binding the contract method 0xd73dd623. +// +// Solidity: function increaseApproval(address _spender, uint256 _addedValue) returns(bool success) +func (_ERC *ERCTransactor) IncreaseApproval(opts *bind.TransactOpts, _spender common.Address, _addedValue *big.Int) (*types.Transaction, error) { + return _ERC.contract.Transact(opts, "increaseApproval", _spender, _addedValue) +} + +// IncreaseApproval is a paid mutator transaction binding the contract method 0xd73dd623. +// +// Solidity: function increaseApproval(address _spender, uint256 _addedValue) returns(bool success) +func (_ERC *ERCSession) IncreaseApproval(_spender common.Address, _addedValue *big.Int) (*types.Transaction, error) { + return _ERC.Contract.IncreaseApproval(&_ERC.TransactOpts, _spender, _addedValue) +} + +// IncreaseApproval is a paid mutator transaction binding the contract method 0xd73dd623. +// +// Solidity: function increaseApproval(address _spender, uint256 _addedValue) returns(bool success) +func (_ERC *ERCTransactorSession) IncreaseApproval(_spender common.Address, _addedValue *big.Int) (*types.Transaction, error) { + return _ERC.Contract.IncreaseApproval(&_ERC.TransactOpts, _spender, _addedValue) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool success) +func (_ERC *ERCTransactor) Transfer(opts *bind.TransactOpts, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _ERC.contract.Transact(opts, "transfer", _to, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool success) +func (_ERC *ERCSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { + return _ERC.Contract.Transfer(&_ERC.TransactOpts, _to, _value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address _to, uint256 _value) returns(bool success) +func (_ERC *ERCTransactorSession) Transfer(_to common.Address, _value *big.Int) (*types.Transaction, error) { + return _ERC.Contract.Transfer(&_ERC.TransactOpts, _to, _value) +} + +// TransferAndCall is a paid mutator transaction binding the contract method 0x4000aea0. +// +// Solidity: function transferAndCall(address _to, uint256 _value, bytes _data) returns(bool success) +func (_ERC *ERCTransactor) TransferAndCall(opts *bind.TransactOpts, _to common.Address, _value *big.Int, _data []byte) (*types.Transaction, error) { + return _ERC.contract.Transact(opts, "transferAndCall", _to, _value, _data) +} + +// TransferAndCall is a paid mutator transaction binding the contract method 0x4000aea0. +// +// Solidity: function transferAndCall(address _to, uint256 _value, bytes _data) returns(bool success) +func (_ERC *ERCSession) TransferAndCall(_to common.Address, _value *big.Int, _data []byte) (*types.Transaction, error) { + return _ERC.Contract.TransferAndCall(&_ERC.TransactOpts, _to, _value, _data) +} + +// TransferAndCall is a paid mutator transaction binding the contract method 0x4000aea0. +// +// Solidity: function transferAndCall(address _to, uint256 _value, bytes _data) returns(bool success) +func (_ERC *ERCTransactorSession) TransferAndCall(_to common.Address, _value *big.Int, _data []byte) (*types.Transaction, error) { + return _ERC.Contract.TransferAndCall(&_ERC.TransactOpts, _to, _value, _data) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) +func (_ERC *ERCTransactor) TransferFrom(opts *bind.TransactOpts, _from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _ERC.contract.Transact(opts, "transferFrom", _from, _to, _value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) +func (_ERC *ERCSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _ERC.Contract.TransferFrom(&_ERC.TransactOpts, _from, _to, _value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool) +func (_ERC *ERCTransactorSession) TransferFrom(_from common.Address, _to common.Address, _value *big.Int) (*types.Transaction, error) { + return _ERC.Contract.TransferFrom(&_ERC.TransactOpts, _from, _to, _value) +} + +// ERCApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the ERC contract. +type ERCApprovalIterator struct { + Event *ERCApproval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ERCApprovalIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ERCApproval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ERCApproval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ERCApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERCApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERCApproval represents a Approval event raised by the ERC contract. +type ERCApproval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_ERC *ERCFilterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*ERCApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _ERC.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &ERCApprovalIterator{contract: _ERC.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_ERC *ERCFilterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *ERCApproval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _ERC.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ERCApproval) + if err := _ERC.contract.UnpackLog(event, "Approval", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_ERC *ERCFilterer) ParseApproval(log types.Log) (*ERCApproval, error) { + event := new(ERCApproval) + if err := _ERC.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + return event, nil +} + +// ERCTransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the ERC contract. +type ERCTransferIterator struct { + Event *ERCTransfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *ERCTransferIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(ERCTransfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(ERCTransfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *ERCTransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *ERCTransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// ERCTransfer represents a Transfer event raised by the ERC contract. +type ERCTransfer struct { + From common.Address + To common.Address + Value *big.Int + Data []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c16. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value, bytes data) +func (_ERC *ERCFilterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*ERCTransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _ERC.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &ERCTransferIterator{contract: _ERC.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c16. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value, bytes data) +func (_ERC *ERCFilterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *ERCTransfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _ERC.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(ERCTransfer) + if err := _ERC.contract.UnpackLog(event, "Transfer", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTransfer is a log parse operation binding the contract event 0xe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c16. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value, bytes data) +func (_ERC *ERCFilterer) ParseTransfer(log types.Log) (*ERCTransfer, error) { + event := new(ERCTransfer) + if err := _ERC.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + return event, nil +} diff --git a/abi/oracle.go b/abi/oracle.go new file mode 100644 index 0000000..8544d9b --- /dev/null +++ b/abi/oracle.go @@ -0,0 +1,1034 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package abi + +import ( + "math/big" + "strings" + + 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 ( + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = abi.U256 + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription +) + +// OracleABI is the input ABI used to generate the binding from. +const OracleABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"_sender\",\"type\":\"address\"},{\"name\":\"_payment\",\"type\":\"uint256\"},{\"name\":\"_specId\",\"type\":\"bytes32\"},{\"name\":\"_callbackAddress\",\"type\":\"address\"},{\"name\":\"_callbackFunctionId\",\"type\":\"bytes4\"},{\"name\":\"_nonce\",\"type\":\"uint256\"},{\"name\":\"_dataVersion\",\"type\":\"uint256\"},{\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"oracleRequest\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_requestId\",\"type\":\"bytes32\"},{\"name\":\"_payment\",\"type\":\"uint256\"},{\"name\":\"_callbackAddress\",\"type\":\"address\"},{\"name\":\"_callbackFunctionId\",\"type\":\"bytes4\"},{\"name\":\"_expiration\",\"type\":\"uint256\"},{\"name\":\"_data\",\"type\":\"bytes32\"}],\"name\":\"fulfillOracleRequest\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"EXPIRY_TIME\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"withdrawable\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_requestId\",\"type\":\"bytes32\"},{\"name\":\"_payment\",\"type\":\"uint256\"},{\"name\":\"_callbackFunc\",\"type\":\"bytes4\"},{\"name\":\"_expiration\",\"type\":\"uint256\"}],\"name\":\"cancelOracleRequest\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_node\",\"type\":\"address\"},{\"name\":\"_allowed\",\"type\":\"bool\"}],\"name\":\"setFulfillmentPermission\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_sender\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"},{\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"onTokenTransfer\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_node\",\"type\":\"address\"}],\"name\":\"getAuthorizationStatus\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_recipient\",\"type\":\"address\"},{\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_link\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"specId\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"requester\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"requestId\",\"type\":\"bytes32\"},{\"indexed\":false,\"name\":\"payment\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"callbackAddr\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"callbackFunctionId\",\"type\":\"bytes4\"},{\"indexed\":false,\"name\":\"cancelExpiration\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"dataVersion\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"OracleRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"requestId\",\"type\":\"bytes32\"}],\"name\":\"CancelOracleRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"}],\"name\":\"OwnershipRenounced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"}]" + +// Oracle is an auto generated Go binding around an Ethereum contract. +type Oracle struct { + OracleCaller // Read-only binding to the contract + OracleTransactor // Write-only binding to the contract + OracleFilterer // Log filterer for contract events +} + +// OracleCaller is an auto generated read-only Go binding around an Ethereum contract. +type OracleCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OracleTransactor is an auto generated write-only Go binding around an Ethereum contract. +type OracleTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OracleFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type OracleFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// OracleSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type OracleSession struct { + Contract *Oracle // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OracleCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type OracleCallerSession struct { + Contract *OracleCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// OracleTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type OracleTransactorSession struct { + Contract *OracleTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// OracleRaw is an auto generated low-level Go binding around an Ethereum contract. +type OracleRaw struct { + Contract *Oracle // Generic contract binding to access the raw methods on +} + +// OracleCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type OracleCallerRaw struct { + Contract *OracleCaller // Generic read-only contract binding to access the raw methods on +} + +// OracleTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type OracleTransactorRaw struct { + Contract *OracleTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewOracle creates a new instance of Oracle, bound to a specific deployed contract. +func NewOracle(address common.Address, backend bind.ContractBackend) (*Oracle, error) { + contract, err := bindOracle(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Oracle{OracleCaller: OracleCaller{contract: contract}, OracleTransactor: OracleTransactor{contract: contract}, OracleFilterer: OracleFilterer{contract: contract}}, nil +} + +// NewOracleCaller creates a new read-only instance of Oracle, bound to a specific deployed contract. +func NewOracleCaller(address common.Address, caller bind.ContractCaller) (*OracleCaller, error) { + contract, err := bindOracle(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &OracleCaller{contract: contract}, nil +} + +// NewOracleTransactor creates a new write-only instance of Oracle, bound to a specific deployed contract. +func NewOracleTransactor(address common.Address, transactor bind.ContractTransactor) (*OracleTransactor, error) { + contract, err := bindOracle(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &OracleTransactor{contract: contract}, nil +} + +// NewOracleFilterer creates a new log filterer instance of Oracle, bound to a specific deployed contract. +func NewOracleFilterer(address common.Address, filterer bind.ContractFilterer) (*OracleFilterer, error) { + contract, err := bindOracle(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &OracleFilterer{contract: contract}, nil +} + +// bindOracle binds a generic wrapper to an already deployed contract. +func bindOracle(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := abi.JSON(strings.NewReader(OracleABI)) + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Oracle *OracleRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Oracle.Contract.OracleCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Oracle *OracleRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Oracle.Contract.OracleTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Oracle *OracleRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Oracle.Contract.OracleTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Oracle *OracleCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error { + return _Oracle.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Oracle *OracleTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Oracle.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Oracle *OracleTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Oracle.Contract.contract.Transact(opts, method, params...) +} + +// EXPIRYTIME is a free data retrieval call binding the contract method 0x4b602282. +// +// Solidity: function EXPIRY_TIME() constant returns(uint256) +func (_Oracle *OracleCaller) EXPIRYTIME(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _Oracle.contract.Call(opts, out, "EXPIRY_TIME") + return *ret0, err +} + +// EXPIRYTIME is a free data retrieval call binding the contract method 0x4b602282. +// +// Solidity: function EXPIRY_TIME() constant returns(uint256) +func (_Oracle *OracleSession) EXPIRYTIME() (*big.Int, error) { + return _Oracle.Contract.EXPIRYTIME(&_Oracle.CallOpts) +} + +// EXPIRYTIME is a free data retrieval call binding the contract method 0x4b602282. +// +// Solidity: function EXPIRY_TIME() constant returns(uint256) +func (_Oracle *OracleCallerSession) EXPIRYTIME() (*big.Int, error) { + return _Oracle.Contract.EXPIRYTIME(&_Oracle.CallOpts) +} + +// GetAuthorizationStatus is a free data retrieval call binding the contract method 0xd3e9c314. +// +// Solidity: function getAuthorizationStatus(address _node) constant returns(bool) +func (_Oracle *OracleCaller) GetAuthorizationStatus(opts *bind.CallOpts, _node common.Address) (bool, error) { + var ( + ret0 = new(bool) + ) + out := ret0 + err := _Oracle.contract.Call(opts, out, "getAuthorizationStatus", _node) + return *ret0, err +} + +// GetAuthorizationStatus is a free data retrieval call binding the contract method 0xd3e9c314. +// +// Solidity: function getAuthorizationStatus(address _node) constant returns(bool) +func (_Oracle *OracleSession) GetAuthorizationStatus(_node common.Address) (bool, error) { + return _Oracle.Contract.GetAuthorizationStatus(&_Oracle.CallOpts, _node) +} + +// GetAuthorizationStatus is a free data retrieval call binding the contract method 0xd3e9c314. +// +// Solidity: function getAuthorizationStatus(address _node) constant returns(bool) +func (_Oracle *OracleCallerSession) GetAuthorizationStatus(_node common.Address) (bool, error) { + return _Oracle.Contract.GetAuthorizationStatus(&_Oracle.CallOpts, _node) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() constant returns(address) +func (_Oracle *OracleCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var ( + ret0 = new(common.Address) + ) + out := ret0 + err := _Oracle.contract.Call(opts, out, "owner") + return *ret0, err +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() constant returns(address) +func (_Oracle *OracleSession) Owner() (common.Address, error) { + return _Oracle.Contract.Owner(&_Oracle.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() constant returns(address) +func (_Oracle *OracleCallerSession) Owner() (common.Address, error) { + return _Oracle.Contract.Owner(&_Oracle.CallOpts) +} + +// Withdrawable is a free data retrieval call binding the contract method 0x50188301. +// +// Solidity: function withdrawable() constant returns(uint256) +func (_Oracle *OracleCaller) Withdrawable(opts *bind.CallOpts) (*big.Int, error) { + var ( + ret0 = new(*big.Int) + ) + out := ret0 + err := _Oracle.contract.Call(opts, out, "withdrawable") + return *ret0, err +} + +// Withdrawable is a free data retrieval call binding the contract method 0x50188301. +// +// Solidity: function withdrawable() constant returns(uint256) +func (_Oracle *OracleSession) Withdrawable() (*big.Int, error) { + return _Oracle.Contract.Withdrawable(&_Oracle.CallOpts) +} + +// Withdrawable is a free data retrieval call binding the contract method 0x50188301. +// +// Solidity: function withdrawable() constant returns(uint256) +func (_Oracle *OracleCallerSession) Withdrawable() (*big.Int, error) { + return _Oracle.Contract.Withdrawable(&_Oracle.CallOpts) +} + +// CancelOracleRequest is a paid mutator transaction binding the contract method 0x6ee4d553. +// +// Solidity: function cancelOracleRequest(bytes32 _requestId, uint256 _payment, bytes4 _callbackFunc, uint256 _expiration) returns() +func (_Oracle *OracleTransactor) CancelOracleRequest(opts *bind.TransactOpts, _requestId [32]byte, _payment *big.Int, _callbackFunc [4]byte, _expiration *big.Int) (*types.Transaction, error) { + return _Oracle.contract.Transact(opts, "cancelOracleRequest", _requestId, _payment, _callbackFunc, _expiration) +} + +// CancelOracleRequest is a paid mutator transaction binding the contract method 0x6ee4d553. +// +// Solidity: function cancelOracleRequest(bytes32 _requestId, uint256 _payment, bytes4 _callbackFunc, uint256 _expiration) returns() +func (_Oracle *OracleSession) CancelOracleRequest(_requestId [32]byte, _payment *big.Int, _callbackFunc [4]byte, _expiration *big.Int) (*types.Transaction, error) { + return _Oracle.Contract.CancelOracleRequest(&_Oracle.TransactOpts, _requestId, _payment, _callbackFunc, _expiration) +} + +// CancelOracleRequest is a paid mutator transaction binding the contract method 0x6ee4d553. +// +// Solidity: function cancelOracleRequest(bytes32 _requestId, uint256 _payment, bytes4 _callbackFunc, uint256 _expiration) returns() +func (_Oracle *OracleTransactorSession) CancelOracleRequest(_requestId [32]byte, _payment *big.Int, _callbackFunc [4]byte, _expiration *big.Int) (*types.Transaction, error) { + return _Oracle.Contract.CancelOracleRequest(&_Oracle.TransactOpts, _requestId, _payment, _callbackFunc, _expiration) +} + +// FulfillOracleRequest is a paid mutator transaction binding the contract method 0x4ab0d190. +// +// Solidity: function fulfillOracleRequest(bytes32 _requestId, uint256 _payment, address _callbackAddress, bytes4 _callbackFunctionId, uint256 _expiration, bytes32 _data) returns(bool) +func (_Oracle *OracleTransactor) FulfillOracleRequest(opts *bind.TransactOpts, _requestId [32]byte, _payment *big.Int, _callbackAddress common.Address, _callbackFunctionId [4]byte, _expiration *big.Int, _data [32]byte) (*types.Transaction, error) { + return _Oracle.contract.Transact(opts, "fulfillOracleRequest", _requestId, _payment, _callbackAddress, _callbackFunctionId, _expiration, _data) +} + +// FulfillOracleRequest is a paid mutator transaction binding the contract method 0x4ab0d190. +// +// Solidity: function fulfillOracleRequest(bytes32 _requestId, uint256 _payment, address _callbackAddress, bytes4 _callbackFunctionId, uint256 _expiration, bytes32 _data) returns(bool) +func (_Oracle *OracleSession) FulfillOracleRequest(_requestId [32]byte, _payment *big.Int, _callbackAddress common.Address, _callbackFunctionId [4]byte, _expiration *big.Int, _data [32]byte) (*types.Transaction, error) { + return _Oracle.Contract.FulfillOracleRequest(&_Oracle.TransactOpts, _requestId, _payment, _callbackAddress, _callbackFunctionId, _expiration, _data) +} + +// FulfillOracleRequest is a paid mutator transaction binding the contract method 0x4ab0d190. +// +// Solidity: function fulfillOracleRequest(bytes32 _requestId, uint256 _payment, address _callbackAddress, bytes4 _callbackFunctionId, uint256 _expiration, bytes32 _data) returns(bool) +func (_Oracle *OracleTransactorSession) FulfillOracleRequest(_requestId [32]byte, _payment *big.Int, _callbackAddress common.Address, _callbackFunctionId [4]byte, _expiration *big.Int, _data [32]byte) (*types.Transaction, error) { + return _Oracle.Contract.FulfillOracleRequest(&_Oracle.TransactOpts, _requestId, _payment, _callbackAddress, _callbackFunctionId, _expiration, _data) +} + +// OnTokenTransfer is a paid mutator transaction binding the contract method 0xa4c0ed36. +// +// Solidity: function onTokenTransfer(address _sender, uint256 _amount, bytes _data) returns() +func (_Oracle *OracleTransactor) OnTokenTransfer(opts *bind.TransactOpts, _sender common.Address, _amount *big.Int, _data []byte) (*types.Transaction, error) { + return _Oracle.contract.Transact(opts, "onTokenTransfer", _sender, _amount, _data) +} + +// OnTokenTransfer is a paid mutator transaction binding the contract method 0xa4c0ed36. +// +// Solidity: function onTokenTransfer(address _sender, uint256 _amount, bytes _data) returns() +func (_Oracle *OracleSession) OnTokenTransfer(_sender common.Address, _amount *big.Int, _data []byte) (*types.Transaction, error) { + return _Oracle.Contract.OnTokenTransfer(&_Oracle.TransactOpts, _sender, _amount, _data) +} + +// OnTokenTransfer is a paid mutator transaction binding the contract method 0xa4c0ed36. +// +// Solidity: function onTokenTransfer(address _sender, uint256 _amount, bytes _data) returns() +func (_Oracle *OracleTransactorSession) OnTokenTransfer(_sender common.Address, _amount *big.Int, _data []byte) (*types.Transaction, error) { + return _Oracle.Contract.OnTokenTransfer(&_Oracle.TransactOpts, _sender, _amount, _data) +} + +// OracleRequest is a paid mutator transaction binding the contract method 0x40429946. +// +// Solidity: function oracleRequest(address _sender, uint256 _payment, bytes32 _specId, address _callbackAddress, bytes4 _callbackFunctionId, uint256 _nonce, uint256 _dataVersion, bytes _data) returns() +func (_Oracle *OracleTransactor) OracleRequest(opts *bind.TransactOpts, _sender common.Address, _payment *big.Int, _specId [32]byte, _callbackAddress common.Address, _callbackFunctionId [4]byte, _nonce *big.Int, _dataVersion *big.Int, _data []byte) (*types.Transaction, error) { + return _Oracle.contract.Transact(opts, "oracleRequest", _sender, _payment, _specId, _callbackAddress, _callbackFunctionId, _nonce, _dataVersion, _data) +} + +// OracleRequest is a paid mutator transaction binding the contract method 0x40429946. +// +// Solidity: function oracleRequest(address _sender, uint256 _payment, bytes32 _specId, address _callbackAddress, bytes4 _callbackFunctionId, uint256 _nonce, uint256 _dataVersion, bytes _data) returns() +func (_Oracle *OracleSession) OracleRequest(_sender common.Address, _payment *big.Int, _specId [32]byte, _callbackAddress common.Address, _callbackFunctionId [4]byte, _nonce *big.Int, _dataVersion *big.Int, _data []byte) (*types.Transaction, error) { + return _Oracle.Contract.OracleRequest(&_Oracle.TransactOpts, _sender, _payment, _specId, _callbackAddress, _callbackFunctionId, _nonce, _dataVersion, _data) +} + +// OracleRequest is a paid mutator transaction binding the contract method 0x40429946. +// +// Solidity: function oracleRequest(address _sender, uint256 _payment, bytes32 _specId, address _callbackAddress, bytes4 _callbackFunctionId, uint256 _nonce, uint256 _dataVersion, bytes _data) returns() +func (_Oracle *OracleTransactorSession) OracleRequest(_sender common.Address, _payment *big.Int, _specId [32]byte, _callbackAddress common.Address, _callbackFunctionId [4]byte, _nonce *big.Int, _dataVersion *big.Int, _data []byte) (*types.Transaction, error) { + return _Oracle.Contract.OracleRequest(&_Oracle.TransactOpts, _sender, _payment, _specId, _callbackAddress, _callbackFunctionId, _nonce, _dataVersion, _data) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Oracle *OracleTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Oracle.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Oracle *OracleSession) RenounceOwnership() (*types.Transaction, error) { + return _Oracle.Contract.RenounceOwnership(&_Oracle.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Oracle *OracleTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _Oracle.Contract.RenounceOwnership(&_Oracle.TransactOpts) +} + +// SetFulfillmentPermission is a paid mutator transaction binding the contract method 0x7fcd56db. +// +// Solidity: function setFulfillmentPermission(address _node, bool _allowed) returns() +func (_Oracle *OracleTransactor) SetFulfillmentPermission(opts *bind.TransactOpts, _node common.Address, _allowed bool) (*types.Transaction, error) { + return _Oracle.contract.Transact(opts, "setFulfillmentPermission", _node, _allowed) +} + +// SetFulfillmentPermission is a paid mutator transaction binding the contract method 0x7fcd56db. +// +// Solidity: function setFulfillmentPermission(address _node, bool _allowed) returns() +func (_Oracle *OracleSession) SetFulfillmentPermission(_node common.Address, _allowed bool) (*types.Transaction, error) { + return _Oracle.Contract.SetFulfillmentPermission(&_Oracle.TransactOpts, _node, _allowed) +} + +// SetFulfillmentPermission is a paid mutator transaction binding the contract method 0x7fcd56db. +// +// Solidity: function setFulfillmentPermission(address _node, bool _allowed) returns() +func (_Oracle *OracleTransactorSession) SetFulfillmentPermission(_node common.Address, _allowed bool) (*types.Transaction, error) { + return _Oracle.Contract.SetFulfillmentPermission(&_Oracle.TransactOpts, _node, _allowed) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address _newOwner) returns() +func (_Oracle *OracleTransactor) TransferOwnership(opts *bind.TransactOpts, _newOwner common.Address) (*types.Transaction, error) { + return _Oracle.contract.Transact(opts, "transferOwnership", _newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address _newOwner) returns() +func (_Oracle *OracleSession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error) { + return _Oracle.Contract.TransferOwnership(&_Oracle.TransactOpts, _newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address _newOwner) returns() +func (_Oracle *OracleTransactorSession) TransferOwnership(_newOwner common.Address) (*types.Transaction, error) { + return _Oracle.Contract.TransferOwnership(&_Oracle.TransactOpts, _newOwner) +} + +// Withdraw is a paid mutator transaction binding the contract method 0xf3fef3a3. +// +// Solidity: function withdraw(address _recipient, uint256 _amount) returns() +func (_Oracle *OracleTransactor) Withdraw(opts *bind.TransactOpts, _recipient common.Address, _amount *big.Int) (*types.Transaction, error) { + return _Oracle.contract.Transact(opts, "withdraw", _recipient, _amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0xf3fef3a3. +// +// Solidity: function withdraw(address _recipient, uint256 _amount) returns() +func (_Oracle *OracleSession) Withdraw(_recipient common.Address, _amount *big.Int) (*types.Transaction, error) { + return _Oracle.Contract.Withdraw(&_Oracle.TransactOpts, _recipient, _amount) +} + +// Withdraw is a paid mutator transaction binding the contract method 0xf3fef3a3. +// +// Solidity: function withdraw(address _recipient, uint256 _amount) returns() +func (_Oracle *OracleTransactorSession) Withdraw(_recipient common.Address, _amount *big.Int) (*types.Transaction, error) { + return _Oracle.Contract.Withdraw(&_Oracle.TransactOpts, _recipient, _amount) +} + +// OracleCancelOracleRequestIterator is returned from FilterCancelOracleRequest and is used to iterate over the raw logs and unpacked data for CancelOracleRequest events raised by the Oracle contract. +type OracleCancelOracleRequestIterator struct { + Event *OracleCancelOracleRequest // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *OracleCancelOracleRequestIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(OracleCancelOracleRequest) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(OracleCancelOracleRequest) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *OracleCancelOracleRequestIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OracleCancelOracleRequestIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OracleCancelOracleRequest represents a CancelOracleRequest event raised by the Oracle contract. +type OracleCancelOracleRequest struct { + RequestId [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCancelOracleRequest is a free log retrieval operation binding the contract event 0xa7842b9ec549398102c0d91b1b9919b2f20558aefdadf57528a95c6cd3292e93. +// +// Solidity: event CancelOracleRequest(bytes32 indexed requestId) +func (_Oracle *OracleFilterer) FilterCancelOracleRequest(opts *bind.FilterOpts, requestId [][32]byte) (*OracleCancelOracleRequestIterator, error) { + + var requestIdRule []interface{} + for _, requestIdItem := range requestId { + requestIdRule = append(requestIdRule, requestIdItem) + } + + logs, sub, err := _Oracle.contract.FilterLogs(opts, "CancelOracleRequest", requestIdRule) + if err != nil { + return nil, err + } + return &OracleCancelOracleRequestIterator{contract: _Oracle.contract, event: "CancelOracleRequest", logs: logs, sub: sub}, nil +} + +// WatchCancelOracleRequest is a free log subscription operation binding the contract event 0xa7842b9ec549398102c0d91b1b9919b2f20558aefdadf57528a95c6cd3292e93. +// +// Solidity: event CancelOracleRequest(bytes32 indexed requestId) +func (_Oracle *OracleFilterer) WatchCancelOracleRequest(opts *bind.WatchOpts, sink chan<- *OracleCancelOracleRequest, requestId [][32]byte) (event.Subscription, error) { + + var requestIdRule []interface{} + for _, requestIdItem := range requestId { + requestIdRule = append(requestIdRule, requestIdItem) + } + + logs, sub, err := _Oracle.contract.WatchLogs(opts, "CancelOracleRequest", requestIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OracleCancelOracleRequest) + if err := _Oracle.contract.UnpackLog(event, "CancelOracleRequest", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseCancelOracleRequest is a log parse operation binding the contract event 0xa7842b9ec549398102c0d91b1b9919b2f20558aefdadf57528a95c6cd3292e93. +// +// Solidity: event CancelOracleRequest(bytes32 indexed requestId) +func (_Oracle *OracleFilterer) ParseCancelOracleRequest(log types.Log) (*OracleCancelOracleRequest, error) { + event := new(OracleCancelOracleRequest) + if err := _Oracle.contract.UnpackLog(event, "CancelOracleRequest", log); err != nil { + return nil, err + } + return event, nil +} + +// OracleOracleRequestIterator is returned from FilterOracleRequest and is used to iterate over the raw logs and unpacked data for OracleRequest events raised by the Oracle contract. +type OracleOracleRequestIterator struct { + Event *OracleOracleRequest // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *OracleOracleRequestIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(OracleOracleRequest) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(OracleOracleRequest) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *OracleOracleRequestIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OracleOracleRequestIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OracleOracleRequest represents a OracleRequest event raised by the Oracle contract. +type OracleOracleRequest struct { + SpecId [32]byte + Requester common.Address + RequestId [32]byte + Payment *big.Int + CallbackAddr common.Address + CallbackFunctionId [4]byte + CancelExpiration *big.Int + DataVersion *big.Int + Data []byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOracleRequest is a free log retrieval operation binding the contract event 0xd8d7ecc4800d25fa53ce0372f13a416d98907a7ef3d8d3bdd79cf4fe75529c65. +// +// Solidity: event OracleRequest(bytes32 indexed specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data) +func (_Oracle *OracleFilterer) FilterOracleRequest(opts *bind.FilterOpts, specId [][32]byte) (*OracleOracleRequestIterator, error) { + + var specIdRule []interface{} + for _, specIdItem := range specId { + specIdRule = append(specIdRule, specIdItem) + } + + logs, sub, err := _Oracle.contract.FilterLogs(opts, "OracleRequest", specIdRule) + if err != nil { + return nil, err + } + return &OracleOracleRequestIterator{contract: _Oracle.contract, event: "OracleRequest", logs: logs, sub: sub}, nil +} + +// WatchOracleRequest is a free log subscription operation binding the contract event 0xd8d7ecc4800d25fa53ce0372f13a416d98907a7ef3d8d3bdd79cf4fe75529c65. +// +// Solidity: event OracleRequest(bytes32 indexed specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data) +func (_Oracle *OracleFilterer) WatchOracleRequest(opts *bind.WatchOpts, sink chan<- *OracleOracleRequest, specId [][32]byte) (event.Subscription, error) { + + var specIdRule []interface{} + for _, specIdItem := range specId { + specIdRule = append(specIdRule, specIdItem) + } + + logs, sub, err := _Oracle.contract.WatchLogs(opts, "OracleRequest", specIdRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OracleOracleRequest) + if err := _Oracle.contract.UnpackLog(event, "OracleRequest", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOracleRequest is a log parse operation binding the contract event 0xd8d7ecc4800d25fa53ce0372f13a416d98907a7ef3d8d3bdd79cf4fe75529c65. +// +// Solidity: event OracleRequest(bytes32 indexed specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data) +func (_Oracle *OracleFilterer) ParseOracleRequest(log types.Log) (*OracleOracleRequest, error) { + event := new(OracleOracleRequest) + if err := _Oracle.contract.UnpackLog(event, "OracleRequest", log); err != nil { + return nil, err + } + return event, nil +} + +// OracleOwnershipRenouncedIterator is returned from FilterOwnershipRenounced and is used to iterate over the raw logs and unpacked data for OwnershipRenounced events raised by the Oracle contract. +type OracleOwnershipRenouncedIterator struct { + Event *OracleOwnershipRenounced // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *OracleOwnershipRenouncedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(OracleOwnershipRenounced) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(OracleOwnershipRenounced) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *OracleOwnershipRenouncedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OracleOwnershipRenouncedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OracleOwnershipRenounced represents a OwnershipRenounced event raised by the Oracle contract. +type OracleOwnershipRenounced struct { + PreviousOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipRenounced is a free log retrieval operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_Oracle *OracleFilterer) FilterOwnershipRenounced(opts *bind.FilterOpts, previousOwner []common.Address) (*OracleOwnershipRenouncedIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + + logs, sub, err := _Oracle.contract.FilterLogs(opts, "OwnershipRenounced", previousOwnerRule) + if err != nil { + return nil, err + } + return &OracleOwnershipRenouncedIterator{contract: _Oracle.contract, event: "OwnershipRenounced", logs: logs, sub: sub}, nil +} + +// WatchOwnershipRenounced is a free log subscription operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_Oracle *OracleFilterer) WatchOwnershipRenounced(opts *bind.WatchOpts, sink chan<- *OracleOwnershipRenounced, previousOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + + logs, sub, err := _Oracle.contract.WatchLogs(opts, "OwnershipRenounced", previousOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OracleOwnershipRenounced) + if err := _Oracle.contract.UnpackLog(event, "OwnershipRenounced", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipRenounced is a log parse operation binding the contract event 0xf8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c64820. +// +// Solidity: event OwnershipRenounced(address indexed previousOwner) +func (_Oracle *OracleFilterer) ParseOwnershipRenounced(log types.Log) (*OracleOwnershipRenounced, error) { + event := new(OracleOwnershipRenounced) + if err := _Oracle.contract.UnpackLog(event, "OwnershipRenounced", log); err != nil { + return nil, err + } + return event, nil +} + +// OracleOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Oracle contract. +type OracleOwnershipTransferredIterator struct { + Event *OracleOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *OracleOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(OracleOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(OracleOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *OracleOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *OracleOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// OracleOwnershipTransferred represents a OwnershipTransferred event raised by the Oracle contract. +type OracleOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Oracle *OracleFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*OracleOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Oracle.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &OracleOwnershipTransferredIterator{contract: _Oracle.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Oracle *OracleFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *OracleOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Oracle.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(OracleOwnershipTransferred) + if err := _Oracle.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Oracle *OracleFilterer) ParseOwnershipTransferred(log types.Log) (*OracleOwnershipTransferred, error) { + event := new(OracleOwnershipTransferred) + if err := _Oracle.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + return event, nil +} diff --git a/cmd/chainlink_exporter/aggregator.go b/cmd/chainlink_exporter/aggregator.go new file mode 100644 index 0000000..f29cd2d --- /dev/null +++ b/cmd/chainlink_exporter/aggregator.go @@ -0,0 +1,100 @@ +package main + +import ( + "chainlink_exporter/abi" + "encoding/hex" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "go.uber.org/zap" + "sync" + "time" +) + +type ( + AggregatorMonitor struct { + aggregator *abi.Aggregator + address common.Address + + pendingJobs map[string]*abi.OracleOracleRequest + + monitor *Monitor + lock sync.Mutex + } +) + +func NewAggregatorMonitor(agg *abi.Aggregator, addr common.Address, m *Monitor) *AggregatorMonitor { + return &AggregatorMonitor{ + aggregator: agg, + pendingJobs: map[string]*abi.OracleOracleRequest{}, + monitor: m, + address: addr, + } +} + +func (a *AggregatorMonitor) Monitor() { + for { + zap.L().Debug("Starting aggregator routine", zap.String("address", a.address.String())) + func() { + resChan := make(chan *abi.AggregatorChainlinkFulfilled) + sub, err := a.aggregator.WatchChainlinkFulfilled(&bind.WatchOpts{}, resChan, nil) + if err != nil { + zap.L().Error("failed to watch aggregator fulfillment", zap.Error(err), zap.String("address", a.address.String())) + return + } + defer sub.Unsubscribe() + + for { + select { + case err = <-sub.Err(): + zap.L().Error("aggregator fulfillment subscription errored", zap.Error(err), zap.String("address", a.address.String())) + return + case res, has := <-resChan: + if !has { + } + a.handleFulfillment(res) + } + } + }() + + zap.L().Warn("aggregator routine died. restarting in 5sec", zap.String("address", a.address.String())) + time.Sleep(5 * time.Second) + } +} + +func (a *AggregatorMonitor) HandleNewBlock(height uint64) { + a.lock.Lock() + defer a.lock.Unlock() + + for reqID, n := range a.pendingJobs { + delta := int(height) - int(n.Raw.BlockNumber) + // todo make dynamic + if delta > 15 { + zap.L().Info("job fulfillment slot missed", zap.Uint64("height", n.Raw.BlockNumber), + zap.String("requester", n.Requester.String()), zap.Binary("request_id", n.RequestId[:]), + zap.ByteString("spec_id", n.SpecId[:])) + delete(a.pendingJobs, reqID) + a.monitor.HandleMiss(n) + } + } +} + +func (a *AggregatorMonitor) handleRequest(res *abi.OracleOracleRequest) { + a.lock.Lock() + defer a.lock.Unlock() + + a.pendingJobs[hex.EncodeToString(res.RequestId[:])] = res +} + +func (a *AggregatorMonitor) handleFulfillment(res *abi.AggregatorChainlinkFulfilled) { + a.lock.Lock() + defer a.lock.Unlock() + + if job, ok := a.pendingJobs[hex.EncodeToString(res.Id[:])]; ok { + zap.L().Info("job fulfilled", zap.Uint64("height", res.Raw.BlockNumber), + zap.String("requester", job.Requester.String()), zap.Binary("request_id", job.RequestId[:]), + zap.ByteString("spec_id", job.SpecId[:]), zap.Uint64("request_height", job.Raw.BlockNumber)) + delete(a.pendingJobs, hex.EncodeToString(res.Id[:])) + + a.monitor.HandleFulfillment(res, job) + } +} diff --git a/cmd/chainlink_exporter/main.go b/cmd/chainlink_exporter/main.go new file mode 100644 index 0000000..1cd961c --- /dev/null +++ b/cmd/chainlink_exporter/main.go @@ -0,0 +1,60 @@ +package main + +import ( + "context" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/ethclient" + "github.com/prometheus/client_golang/prometheus/promhttp" + "go.uber.org/zap" + + "net/http" + "os" + "time" +) + +var ( + oracleAddr = os.Getenv("ADDRESS") + fulfillmentAddr = os.Getenv("NODE_ADDRESS") + linkAddr = os.Getenv("LINK_ADDRESS") + rpcHost = os.Getenv("RPC") + lAddr = os.Getenv("LADDR") +) + +func main() { + l, _ := zap.NewProduction() + zap.ReplaceGlobals(l) + + if lAddr == "" { + panic("LADDR must be set") + } + if rpcHost == "" { + panic("RPC must be set") + } + if fulfillmentAddr == "" { + panic("NODE_ADDRESS must be set") + } + if oracleAddr == "" { + panic("ADDRESS must be set") + } + if linkAddr == "" { + zap.L().Warn("LINK_ADDRESS isn't set. Falling back to mainnet default.") + linkAddr = "0x514910771af9ca656af840dff83e8264ecf986ca" + } + + ctx, cancel := context.WithTimeout(context.Background(), time.Second*2) + defer cancel() + c, err := ethclient.DialContext(ctx, rpcHost) + if err != nil { + panic(err) + } + + mon, err := NewMonitor(common.HexToAddress(oracleAddr), common.HexToAddress(fulfillmentAddr), common.HexToAddress(linkAddr), c) + if err != nil { + panic(err) + } + mon.Start() + + http.Handle("/metrics", promhttp.Handler()) + + panic(http.ListenAndServe(lAddr, nil)) +} diff --git a/cmd/chainlink_exporter/monitor.go b/cmd/chainlink_exporter/monitor.go new file mode 100644 index 0000000..e433b14 --- /dev/null +++ b/cmd/chainlink_exporter/monitor.go @@ -0,0 +1,322 @@ +package main + +import ( + "chainlink_exporter/abi" + "context" + "fmt" + "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/ethclient" + "github.com/ethereum/go-ethereum/params" + "github.com/prometheus/client_golang/prometheus" + "go.uber.org/atomic" + "go.uber.org/zap" + "math/big" + "sync" + "time" +) + +const ( + PRECISION = 1000000000 +) + +type ( + Monitor struct { + client *ethclient.Client + aggregators map[common.Address]*AggregatorMonitor + + addr common.Address + fulfillmentAddr common.Address + oracle *abi.Oracle + linkContract *abi.ERC + + lock sync.Mutex + + lastResTime *atomic.Uint64 + lastReqTime *atomic.Uint64 + + lastResGauge prometheus.Gauge + lastReqGauge prometheus.Gauge + currentHeightGauge prometheus.Gauge + balanceGauge prometheus.Gauge + linkBalanceGauge *prometheus.GaugeVec + responseTimeHistogram *prometheus.HistogramVec + + revenueCounter *prometheus.CounterVec + fulfillmentCounter *prometheus.CounterVec + missCounter *prometheus.CounterVec + } +) + +func NewMonitor(addr common.Address, fulfillmentAddr common.Address, linkAddr common.Address, client *ethclient.Client) (*Monitor, error) { + m := &Monitor{ + addr: addr, + fulfillmentAddr: fulfillmentAddr, + client: client, + aggregators: map[common.Address]*AggregatorMonitor{}, + lock: sync.Mutex{}, + lastResTime: atomic.NewUint64(0), + lastReqTime: atomic.NewUint64(0), + lastResGauge: prometheus.NewGauge(prometheus.GaugeOpts{ + Namespace: "cl", + Subsystem: "mon", + Name: "last_response", + Help: "Height of the last response", + }), + lastReqGauge: prometheus.NewGauge(prometheus.GaugeOpts{ + Namespace: "cl", + Subsystem: "mon", + Name: "last_request", + Help: "Height of the last oracle request", + }), + currentHeightGauge: prometheus.NewGauge(prometheus.GaugeOpts{ + Namespace: "cl", + Subsystem: "mon", + Name: "height", + Help: "Last synced height", + }), + responseTimeHistogram: prometheus.NewHistogramVec(prometheus.HistogramOpts{ + Namespace: "cl", + Subsystem: "mon", + Name: "response_time", + Help: "Average response time in blocks", + Buckets: []float64{1, 2, 3, 4, 5, 10, 15}, + }, []string{"spec_id"}), + fulfillmentCounter: prometheus.NewCounterVec(prometheus.CounterOpts{ + Namespace: "cl", + Subsystem: "mon", + Name: "fulfilled", + Help: "Number of successfully fulfilled requests", + }, []string{"spec_id", "requester"}), + missCounter: prometheus.NewCounterVec(prometheus.CounterOpts{ + Namespace: "cl", + Subsystem: "mon", + Name: "missed", + Help: "Number of missed requests", + }, []string{"spec_id", "requester"}), + revenueCounter: prometheus.NewCounterVec(prometheus.CounterOpts{ + Namespace: "cl", + Subsystem: "mon", + Name: "revenue", + Help: "Number of LINK tokens earned", + }, []string{"spec_id", "requester", "status"}), + balanceGauge: prometheus.NewGauge(prometheus.GaugeOpts{ + Namespace: "cl", + Subsystem: "mon", + Name: "eth_balance", + Help: "Balance of the oracle account", + }), + linkBalanceGauge: prometheus.NewGaugeVec(prometheus.GaugeOpts{ + Namespace: "cl", + Subsystem: "mon", + Name: "link_balance", + Help: "Link balance of the oracle", + }, []string{"type"}), + } + + prometheus.MustRegister(m.lastResGauge) + prometheus.MustRegister(m.lastReqGauge) + prometheus.MustRegister(m.currentHeightGauge) + prometheus.MustRegister(m.responseTimeHistogram) + prometheus.MustRegister(m.fulfillmentCounter) + prometheus.MustRegister(m.revenueCounter) + prometheus.MustRegister(m.missCounter) + prometheus.MustRegister(m.balanceGauge) + prometheus.MustRegister(m.linkBalanceGauge) + + oracle, err := abi.NewOracle(addr, m.client) + if err != nil { + return nil, err + } + m.oracle = oracle + + linkContract, err := abi.NewERC(linkAddr, m.client) + if err != nil { + return nil, err + } + m.linkContract = linkContract + + _, err = oracle.Owner(nil) + if err != nil { + return nil, fmt.Errorf("address does not belong to an oracle") + } + + return m, nil +} + +func (m *Monitor) Start() { + go m.pollRoutine() + go m.metricRoutine() +} + +func (m *Monitor) metricRoutine() { + zap.L().Info("Starting metric routine") + ticker := time.NewTicker(time.Second) + defer ticker.Stop() + + for { + select { + case <-ticker.C: + m.lastResGauge.Set(float64(m.lastResTime.Load())) + m.lastReqGauge.Set(float64(m.lastReqTime.Load())) + } + } +} + +func (m *Monitor) updateBalances() { + zap.L().Debug("fetching balances") + + ctx, cancel := context.WithTimeout(context.Background(), time.Second*5) + defer cancel() + balance, err := m.client.BalanceAt(ctx, m.fulfillmentAddr, nil) + if err != nil { + zap.L().Error("failed to fetch oracle balance", zap.Error(err)) + return + } + + balance.Div(balance, big.NewInt(params.Ether/PRECISION)) + m.balanceGauge.Set(float64(balance.Uint64()) / PRECISION) + + ctx, cancel = context.WithTimeout(context.Background(), time.Second*5) + defer cancel() + owner, err := m.oracle.Owner(&bind.CallOpts{ + Context: ctx, + }) + withdrawableLinkBalance, err := m.oracle.Withdrawable(&bind.CallOpts{ + From: owner, + Context: ctx, + }) + if err != nil { + zap.L().Error("failed to fetch withdrawable LINK balance", zap.Error(err)) + return + } + withdrawableLinkBalance.Div(withdrawableLinkBalance, big.NewInt(params.Ether/PRECISION)) + m.linkBalanceGauge.WithLabelValues("withdrawable").Set(float64(withdrawableLinkBalance.Uint64()) / PRECISION) + + ctx, cancel = context.WithTimeout(context.Background(), time.Second*5) + defer cancel() + linkBalance, err := m.linkContract.BalanceOf(&bind.CallOpts{Context: ctx}, m.addr) + if err != nil { + zap.L().Error("failed to fetch LINK balance", zap.Error(err)) + return + } + linkBalance.Div(linkBalance, big.NewInt(params.Ether/PRECISION)) + m.linkBalanceGauge.WithLabelValues("balance").Set(float64(linkBalance.Uint64()) / PRECISION) + + zap.L().Debug("fetched balances") +} + +func (m *Monitor) pollRoutine() { + for { + zap.L().Info("Starting poll routine") + func() { + reqChan := make(chan *abi.OracleOracleRequest) + sub, err := m.oracle.WatchOracleRequest(nil, reqChan, nil) + if err != nil { + zap.L().Error("failed to watch oracle requests", zap.Error(err)) + return + } + defer sub.Unsubscribe() + + headChan := make(chan *types.Header) + sub2, err := m.client.SubscribeNewHead(context.Background(), headChan) + if err != nil { + zap.L().Error("failed to subscribe to new heads", zap.Error(err)) + return + } + defer sub2.Unsubscribe() + + for { + select { + case err = <-sub.Err(): + zap.L().Error("oracle requests subscription errored", zap.Error(err)) + return + case err = <-sub2.Err(): + zap.L().Error("head subscription errored", zap.Error(err)) + return + case req, has := <-reqChan: + if !has { + } + err := m.handleRequest(req) + if err != nil { + zap.L().Warn("failed to handle request", zap.Error(err)) + continue + } + case header, has := <-headChan: + if !has { + } + + // Update balances + go m.updateBalances() + + // Update metrics and update aggregator monitors + m.currentHeightGauge.Set(float64(header.Number.Uint64())) + for _, monitor := range m.aggregators { + monitor.HandleNewBlock(header.Number.Uint64()) + } + } + } + }() + + zap.L().Warn("poll routine died. restarting in 5sec") + time.Sleep(5 * time.Second) + } +} + +func (m *Monitor) handleRequest(req *abi.OracleOracleRequest) error { + logger := zap.L().With(zap.Uint64("height", req.Raw.BlockNumber), + zap.String("requester", req.Requester.String()), zap.Binary("request_id", req.RequestId[:]), + zap.ByteString("spec_id", req.SpecId[:])) + logger.Info("received request") + + if old := m.lastReqTime.Load(); old < req.Raw.BlockNumber { + m.lastReqTime.CAS(old, req.Raw.BlockNumber) + } + + if agg, contains := m.aggregators[req.Requester]; contains { + agg.handleRequest(req) + return nil + } + + logger.Debug("requester unknown; creating a new aggregator monitor") + + m.lock.Lock() + defer m.lock.Unlock() + agg, err := abi.NewAggregator(req.Requester, m.client) + if err != nil { + return err + } + + _, err = agg.Owner(nil) + if err != nil { + logger.Warn("requester is not an aggregator") + return nil + } + + am := NewAggregatorMonitor(agg, req.Requester, m) + am.handleRequest(req) + + go am.Monitor() + + m.aggregators[req.Requester] = am + + return nil +} + +func (m *Monitor) HandleFulfillment(res *abi.AggregatorChainlinkFulfilled, req *abi.OracleOracleRequest) { + if old := m.lastResTime.Load(); old < res.Raw.BlockNumber { + m.lastResTime.CAS(old, res.Raw.BlockNumber) + } + + deltaBlocks := res.Raw.BlockNumber - req.Raw.BlockNumber + m.responseTimeHistogram.WithLabelValues(string(req.SpecId[:])).Observe(float64(deltaBlocks)) + + m.fulfillmentCounter.WithLabelValues(string(req.SpecId[:]), req.Requester.String()).Inc() + m.revenueCounter.WithLabelValues(string(req.SpecId[:]), req.Requester.String(), "fulfilled").Add(float64(req.Payment.Uint64()) / params.Ether) +} + +func (m *Monitor) HandleMiss(req *abi.OracleOracleRequest) { + m.missCounter.WithLabelValues(string(req.SpecId[:]), req.Requester.String()).Inc() + m.revenueCounter.WithLabelValues(string(req.SpecId[:]), req.Requester.String(), "missed").Add(float64(req.Payment.Uint64()) / params.Ether) +} diff --git a/contracts/Aggregator.abi b/contracts/Aggregator.abi new file mode 100644 index 0000000..7b809ae --- /dev/null +++ b/contracts/Aggregator.abi @@ -0,0 +1 @@ +[{"constant":false,"inputs":[{"name":"_requestId","type":"bytes32"},{"name":"_payment","type":"uint256"},{"name":"_expiration","type":"uint256"}],"name":"cancelRequest","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"authorizedRequesters","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"jobIds","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"latestAnswer","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"minimumResponses","outputs":[{"name":"","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"oracles","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_recipient","type":"address"},{"name":"_amount","type":"uint256"}],"name":"transferLINK","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"latestRound","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_clRequestId","type":"bytes32"},{"name":"_response","type":"int256"}],"name":"chainlinkCallback","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_paymentAmount","type":"uint128"},{"name":"_minimumResponses","type":"uint128"},{"name":"_oracles","type":"address[]"},{"name":"_jobIds","type":"bytes32[]"}],"name":"updateRequestDetails","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"latestTimestamp","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"destroy","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":"_roundId","type":"uint256"}],"name":"getAnswer","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_roundId","type":"uint256"}],"name":"getTimestamp","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paymentAmount","outputs":[{"name":"","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"requestRateUpdate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_requester","type":"address"},{"name":"_allowed","type":"bool"}],"name":"setAuthorization","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_link","type":"address"},{"name":"_paymentAmount","type":"uint128"},{"name":"_minimumResponses","type":"uint128"},{"name":"_oracles","type":"address[]"},{"name":"_jobIds","type":"bytes32[]"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"response","type":"int256"},{"indexed":true,"name":"answerId","type":"uint256"},{"indexed":true,"name":"sender","type":"address"}],"name":"ResponseReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"}],"name":"OwnershipRenounced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"bytes32"}],"name":"ChainlinkRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"bytes32"}],"name":"ChainlinkFulfilled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"bytes32"}],"name":"ChainlinkCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"current","type":"int256"},{"indexed":true,"name":"roundId","type":"uint256"},{"indexed":false,"name":"timestamp","type":"uint256"}],"name":"AnswerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"roundId","type":"uint256"},{"indexed":true,"name":"startedBy","type":"address"}],"name":"NewRound","type":"event"}] diff --git a/contracts/LinkToken.abi b/contracts/LinkToken.abi new file mode 100644 index 0000000..972e02c --- /dev/null +++ b/contracts/LinkToken.abi @@ -0,0 +1 @@ +[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"transferAndCall","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_subtractedValue","type":"uint256"}],"name":"decreaseApproval","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_addedValue","type":"uint256"}],"name":"increaseApproval","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"data","type":"bytes"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}] diff --git a/contracts/Oracle.abi b/contracts/Oracle.abi new file mode 100644 index 0000000..4b84e8c --- /dev/null +++ b/contracts/Oracle.abi @@ -0,0 +1,355 @@ +[ + { + "constant": false, + "inputs": [ + { + "name": "_sender", + "type": "address" + }, + { + "name": "_payment", + "type": "uint256" + }, + { + "name": "_specId", + "type": "bytes32" + }, + { + "name": "_callbackAddress", + "type": "address" + }, + { + "name": "_callbackFunctionId", + "type": "bytes4" + }, + { + "name": "_nonce", + "type": "uint256" + }, + { + "name": "_dataVersion", + "type": "uint256" + }, + { + "name": "_data", + "type": "bytes" + } + ], + "name": "oracleRequest", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_requestId", + "type": "bytes32" + }, + { + "name": "_payment", + "type": "uint256" + }, + { + "name": "_callbackAddress", + "type": "address" + }, + { + "name": "_callbackFunctionId", + "type": "bytes4" + }, + { + "name": "_expiration", + "type": "uint256" + }, + { + "name": "_data", + "type": "bytes32" + } + ], + "name": "fulfillOracleRequest", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "EXPIRY_TIME", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "withdrawable", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_requestId", + "type": "bytes32" + }, + { + "name": "_payment", + "type": "uint256" + }, + { + "name": "_callbackFunc", + "type": "bytes4" + }, + { + "name": "_expiration", + "type": "uint256" + } + ], + "name": "cancelOracleRequest", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_node", + "type": "address" + }, + { + "name": "_allowed", + "type": "bool" + } + ], + "name": "setFulfillmentPermission", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_sender", + "type": "address" + }, + { + "name": "_amount", + "type": "uint256" + }, + { + "name": "_data", + "type": "bytes" + } + ], + "name": "onTokenTransfer", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_node", + "type": "address" + } + ], + "name": "getAuthorizationStatus", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_recipient", + "type": "address" + }, + { + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "name": "_link", + "type": "address" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "specId", + "type": "bytes32" + }, + { + "indexed": false, + "name": "requester", + "type": "address" + }, + { + "indexed": false, + "name": "requestId", + "type": "bytes32" + }, + { + "indexed": false, + "name": "payment", + "type": "uint256" + }, + { + "indexed": false, + "name": "callbackAddr", + "type": "address" + }, + { + "indexed": false, + "name": "callbackFunctionId", + "type": "bytes4" + }, + { + "indexed": false, + "name": "cancelExpiration", + "type": "uint256" + }, + { + "indexed": false, + "name": "dataVersion", + "type": "uint256" + }, + { + "indexed": false, + "name": "data", + "type": "bytes" + } + ], + "name": "OracleRequest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "requestId", + "type": "bytes32" + } + ], + "name": "CancelOracleRequest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + } + ], + "name": "OwnershipRenounced", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + } +] diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..585fa96 --- /dev/null +++ b/go.mod @@ -0,0 +1,10 @@ +module chainlink_exporter + +go 1.13 + +require ( + github.com/ethereum/go-ethereum v1.9.10 + github.com/prometheus/client_golang v1.3.0 + go.uber.org/atomic v1.5.1 + go.uber.org/zap v1.13.0 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..28cf9f3 --- /dev/null +++ b/go.sum @@ -0,0 +1,282 @@ +github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= +github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= +github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= +github.com/VictoriaMetrics/fastcache v1.5.3 h1:2odJnXLbFZcoV9KYtQ+7TH1UOq3dn3AssMgieaezkR4= +github.com/VictoriaMetrics/fastcache v1.5.3/go.mod h1:+jv9Ckb+za/P1ZRg/sulP5Ni1v49daAVERr0H3CuscE= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= +github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847 h1:rtI0fD4oG/8eVokGVPYJEW1F88p1ZNgXiEIs9thEE4A= +github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= +github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6 h1:Eey/GGQ/E5Xp1P2Lyx1qj007hLZfbi0+CoVeJruGCtI= +github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= +github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= +github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.0.1-0.20190104013014-3767db7a7e18/go.mod h1:HD5P3vAIAh+Y2GAxg0PrPN1P8WkepXGpjbUPDHJqqKM= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea h1:j4317fAZh7X6GqbFowYdYdI0L9bwxL07jyPZIdepyZ0= +github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c h1:JHHhtb9XWJrGNMcrVP6vyzO4dusgi/HnceHTgxSejUM= +github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa h1:XKAhUk/dtp+CV0VO6mhG2V7jA9vbcGcnYF/Ay9NjZrY= +github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa/go.mod h1:cdorVVzy1fhmEqmtgqkoE3bYtCfSCkVyjTyCIo22xvs= +github.com/ethereum/go-ethereum v1.9.10 h1:jooX7tWcscpC7ytufk73t9JMCeJQ7aJF2YmZJQEuvFo= +github.com/ethereum/go-ethereum v1.9.10/go.mod h1:lXHkVo/MTvsEXfYsmNzelZ8R1e0DTvdk/wMZJIRpaRw= +github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc h1:jtW8jbpkO4YirRSyepBOH8E+2HEw6/hKkBvFPwhUN8c= +github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0 h1:wDJmvq38kDhkVxi50ni9ykkdUr1PKgqKOoi01fa0Mdk= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= +github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2-0.20190517061210-b285ee9cfc6c/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989 h1:giknQ4mEuDFmmHSrGcbargOuLHQGtywqo4mheITex54= +github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277 h1:E0whKxgp2ojts0FDgUA8dl62bmH0LxKanMoBr6MDTDM= +github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= +github.com/hashicorp/golang-lru v0.0.0-20160813221303-0a025b7e63ad h1:eMxs9EL0PvIGS9TTtxg4R+JxuPGav82J8rA+GFnY7po= +github.com/hashicorp/golang-lru v0.0.0-20160813221303-0a025b7e63ad/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huin/goupnp v0.0.0-20161224104101-679507af18f3 h1:DqD8eigqlUm0+znmx7zhL0xvTW3+e1jCekJMfBUADWI= +github.com/huin/goupnp v0.0.0-20161224104101-679507af18f3/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag= +github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883 h1:FSeK4fZCo8u40n2JMnyAsd6x7+SbvoOMHvQOU/n10P4= +github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= +github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458 h1:6OvNmYgJyexcZ3pYbTI9jWx5tHo1Dee/tWbLMfPe2TA= +github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356 h1:I/yrLt2WilKxlQKCM52clh5rGzTKpVctGT1lH4Dc8Jw= +github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/mattn/go-colorable v0.1.0 h1:v2XXALHHh6zHfYTJ+cSkwtyffnaOyR1MXaA91mTrb8o= +github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= +github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035 h1:USWjF42jDCSEeikX/G1g40ZWnsPXN5WkZ4jMHZWyBK4= +github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= +github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c h1:1RHs3tNxjXGHeul8z2t6H2N2TlAqpKe5yryJztRx4Jk= +github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222 h1:goeTyGkArOZIVOMA0dQbyuPWGNQJZGPwPu/QS9GlpnA= +github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= +github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.3.0 h1:miYCvYqFXtl/J9FIy8eNpBfYthAEFg+Ys0XyUVEcDsc= +github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.1.0 h1:ElTg5tNp4DqfV7UQjDqv2+RJlNzsDtvNAWccbItceIE= +github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.7.0 h1:L+1lyG48J1zAQXA3RBX/nG/B3gjlHq0zTt2tlbJLyCY= +github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8 h1:+fpWZdT24pJBiqJdAwYBjPSk+5YmQzYNPYzQsdzLkt8= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150 h1:ZeU+auZj1iNzN8iVhff6M38Mfu73FQiJve/GEXYJBjE= +github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE= +github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= +github.com/robertkrimen/otto v0.0.0-20170205013659-6a77b7cbc37d/go.mod h1:xvqspoSXJTIpemEonrMDFq6XzwHYYgToXWj5eRX1OtY= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00 h1:8DPul/X0IT/1TNMIxoKLwdemEOBBHDC/K4EB16Cw5WE= +github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521 h1:3hxavr+IHMsQBrYUPQM5v0CgENFktkkbg1sfpgM3h20= +github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.0.1-0.20190317074736-539464a789e9/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 h1:Gb2Tyox57NRNuZ2d3rmvB3pcmbu7O1RS3m8WRx7ilrg= +github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= +github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570 h1:gIlAHnH1vJb5vwEjIp5kBj/eu99p/bl0Ay2goiPe5xE= +github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= +github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3 h1:njlZPzLwU639dk2kqnCPPv+wNjq7Xb6EfUxe/oX0/NM= +github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs= +github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= +github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef h1:wHSqTBrZW24CsNJDfeh9Ex6Pm0Rcpc7qrgKBiL44vF4= +github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208 h1:1cngl9mPEoITZG8s8cVcUy5CeIBYhEESkOB7m6Gmkrk= +github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= +go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.5.1 h1:rsqfU5vBkVknbhUGbAUwQKR2H4ItV8tjJ+6kJX4cxHM= +go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/multierr v1.3.0 h1:sFPn2GLc3poCkfrpIXGhBD2X0CMIo4Q/zSULXrj/+uc= +go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= +go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= +go.uber.org/zap v1.13.0 h1:nR6NoDBgAf67s68NhaXbsojM+2gxp3S1hWkHDl27pVU= +go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529 h1:iMGN4xG0cnqj3t+zOM8wUB0BiPKHEwSxEZCvzcbZuvk= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7 h1:rTIdg5QFRR7XCaK4LCjBiPbx8j4DQRpdYMnGn/bJUEU= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f h1:68K/z8GLUxV76xGSqwTWw2gyk/jwn79LUL43rES2g8o= +golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c h1:IGkKhmfzcztjm6gYkykvu/NiS8kaqbCWAEWWAyf8J5U= +golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5 h1:hKsoRgsbwY1NafxrwTs+k64bikrLBkAgPir1TNCj3Zs= +golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= +gopkg.in/olebedev/go-duktape.v3 v3.0.0-20190213234257-ec84240a7772 h1:hhsSf/5z74Ck/DJYc+R8zpq8KGm7uJvpdLRQED/IedA= +gopkg.in/olebedev/go-duktape.v3 v3.0.0-20190213234257-ec84240a7772/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= +gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= +gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=