apyth

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ContractABI = ContractMetaData.ABI

ContractABI is the input ABI used to generate the binding from. Deprecated: Use ContractMetaData.ABI instead.

View Source
var ContractMetaData = &bind.MetaData{
	ABI: "[{\"inputs\":[],\"name\":\"InvalidArgument\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoFreshUpdate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"StalePrice\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"publishTime\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"int64\",\"name\":\"price\",\"type\":\"int64\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"conf\",\"type\":\"uint64\"}],\"name\":\"PriceFeedUpdate\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"getEmaPrice\",\"outputs\":[{\"components\":[{\"internalType\":\"int64\",\"name\":\"price\",\"type\":\"int64\"},{\"internalType\":\"uint64\",\"name\":\"conf\",\"type\":\"uint64\"},{\"internalType\":\"int32\",\"name\":\"expo\",\"type\":\"int32\"},{\"internalType\":\"uint256\",\"name\":\"publishTime\",\"type\":\"uint256\"}],\"internalType\":\"structPythStructs.Price\",\"name\":\"price\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"age\",\"type\":\"uint256\"}],\"name\":\"getEmaPriceNoOlderThan\",\"outputs\":[{\"components\":[{\"internalType\":\"int64\",\"name\":\"price\",\"type\":\"int64\"},{\"internalType\":\"uint64\",\"name\":\"conf\",\"type\":\"uint64\"},{\"internalType\":\"int32\",\"name\":\"expo\",\"type\":\"int32\"},{\"internalType\":\"uint256\",\"name\":\"publishTime\",\"type\":\"uint256\"}],\"internalType\":\"structPythStructs.Price\",\"name\":\"price\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"getEmaPriceUnsafe\",\"outputs\":[{\"components\":[{\"internalType\":\"int64\",\"name\":\"price\",\"type\":\"int64\"},{\"internalType\":\"uint64\",\"name\":\"conf\",\"type\":\"uint64\"},{\"internalType\":\"int32\",\"name\":\"expo\",\"type\":\"int32\"},{\"internalType\":\"uint256\",\"name\":\"publishTime\",\"type\":\"uint256\"}],\"internalType\":\"structPythStructs.Price\",\"name\":\"price\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"getPrice\",\"outputs\":[{\"components\":[{\"internalType\":\"int64\",\"name\":\"price\",\"type\":\"int64\"},{\"internalType\":\"uint64\",\"name\":\"conf\",\"type\":\"uint64\"},{\"internalType\":\"int32\",\"name\":\"expo\",\"type\":\"int32\"},{\"internalType\":\"uint256\",\"name\":\"publishTime\",\"type\":\"uint256\"}],\"internalType\":\"structPythStructs.Price\",\"name\":\"price\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"age\",\"type\":\"uint256\"}],\"name\":\"getPriceNoOlderThan\",\"outputs\":[{\"components\":[{\"internalType\":\"int64\",\"name\":\"price\",\"type\":\"int64\"},{\"internalType\":\"uint64\",\"name\":\"conf\",\"type\":\"uint64\"},{\"internalType\":\"int32\",\"name\":\"expo\",\"type\":\"int32\"},{\"internalType\":\"uint256\",\"name\":\"publishTime\",\"type\":\"uint256\"}],\"internalType\":\"structPythStructs.Price\",\"name\":\"price\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"getPriceUnsafe\",\"outputs\":[{\"components\":[{\"internalType\":\"int64\",\"name\":\"price\",\"type\":\"int64\"},{\"internalType\":\"uint64\",\"name\":\"conf\",\"type\":\"uint64\"},{\"internalType\":\"int32\",\"name\":\"expo\",\"type\":\"int32\"},{\"internalType\":\"uint256\",\"name\":\"publishTime\",\"type\":\"uint256\"}],\"internalType\":\"structPythStructs.Price\",\"name\":\"price\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"updateData\",\"type\":\"bytes[]\"}],\"name\":\"getUpdateFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getValidTimePeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"validTimePeriod\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"updateData\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"priceIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"minPublishTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxPublishTime\",\"type\":\"uint64\"}],\"name\":\"parsePriceFeedUpdates\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"int64\",\"name\":\"price\",\"type\":\"int64\"},{\"internalType\":\"uint64\",\"name\":\"conf\",\"type\":\"uint64\"},{\"internalType\":\"int32\",\"name\":\"expo\",\"type\":\"int32\"},{\"internalType\":\"uint256\",\"name\":\"publishTime\",\"type\":\"uint256\"}],\"internalType\":\"structPythStructs.Price\",\"name\":\"price\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"int64\",\"name\":\"price\",\"type\":\"int64\"},{\"internalType\":\"uint64\",\"name\":\"conf\",\"type\":\"uint64\"},{\"internalType\":\"int32\",\"name\":\"expo\",\"type\":\"int32\"},{\"internalType\":\"uint256\",\"name\":\"publishTime\",\"type\":\"uint256\"}],\"internalType\":\"structPythStructs.Price\",\"name\":\"emaPrice\",\"type\":\"tuple\"}],\"internalType\":\"structPythStructs.PriceFeed[]\",\"name\":\"priceFeeds\",\"type\":\"tuple[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"updateData\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"priceIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64\",\"name\":\"minPublishTime\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxPublishTime\",\"type\":\"uint64\"}],\"name\":\"parsePriceFeedUpdatesUnique\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"int64\",\"name\":\"price\",\"type\":\"int64\"},{\"internalType\":\"uint64\",\"name\":\"conf\",\"type\":\"uint64\"},{\"internalType\":\"int32\",\"name\":\"expo\",\"type\":\"int32\"},{\"internalType\":\"uint256\",\"name\":\"publishTime\",\"type\":\"uint256\"}],\"internalType\":\"structPythStructs.Price\",\"name\":\"price\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"int64\",\"name\":\"price\",\"type\":\"int64\"},{\"internalType\":\"uint64\",\"name\":\"conf\",\"type\":\"uint64\"},{\"internalType\":\"int32\",\"name\":\"expo\",\"type\":\"int32\"},{\"internalType\":\"uint256\",\"name\":\"publishTime\",\"type\":\"uint256\"}],\"internalType\":\"structPythStructs.Price\",\"name\":\"emaPrice\",\"type\":\"tuple\"}],\"internalType\":\"structPythStructs.PriceFeed[]\",\"name\":\"priceFeeds\",\"type\":\"tuple[]\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"priceFeedExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"exists\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"}],\"name\":\"queryPriceFeed\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"int64\",\"name\":\"price\",\"type\":\"int64\"},{\"internalType\":\"uint64\",\"name\":\"conf\",\"type\":\"uint64\"},{\"internalType\":\"int32\",\"name\":\"expo\",\"type\":\"int32\"},{\"internalType\":\"uint256\",\"name\":\"publishTime\",\"type\":\"uint256\"}],\"internalType\":\"structPythStructs.Price\",\"name\":\"price\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"int64\",\"name\":\"price\",\"type\":\"int64\"},{\"internalType\":\"uint64\",\"name\":\"conf\",\"type\":\"uint64\"},{\"internalType\":\"int32\",\"name\":\"expo\",\"type\":\"int32\"},{\"internalType\":\"uint256\",\"name\":\"publishTime\",\"type\":\"uint256\"}],\"internalType\":\"structPythStructs.Price\",\"name\":\"emaPrice\",\"type\":\"tuple\"}],\"internalType\":\"structPythStructs.PriceFeed\",\"name\":\"priceFeed\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"updateData\",\"type\":\"bytes[]\"}],\"name\":\"updatePriceFeeds\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"updateData\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"priceIds\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint64[]\",\"name\":\"publishTimes\",\"type\":\"uint64[]\"}],\"name\":\"updatePriceFeedsIfNecessary\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]",
}

ContractMetaData contains all meta data concerning the Contract contract.

Functions

This section is empty.

Types

type Contract

type Contract struct {
	ContractCaller     // Read-only binding to the contract
	ContractTransactor // Write-only binding to the contract
	ContractFilterer   // Log filterer for contract events
}

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

func NewContract

func NewContract(address common.Address, backend bind.ContractBackend) (*Contract, error)

NewContract creates a new instance of Contract, bound to a specific deployed contract.

type ContractCaller

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

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

func NewContractCaller

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

NewContractCaller creates a new read-only instance of Contract, bound to a specific deployed contract.

func (*ContractCaller) GetEmaPrice

func (_Contract *ContractCaller) GetEmaPrice(opts *bind.CallOpts, id [32]byte) (PythStructsPrice, error)

GetEmaPrice is a free data retrieval call binding the contract method 0xb5dcc911.

Solidity: function getEmaPrice(bytes32 id) view returns((int64,uint64,int32,uint256) price)

func (*ContractCaller) GetEmaPriceNoOlderThan

func (_Contract *ContractCaller) GetEmaPriceNoOlderThan(opts *bind.CallOpts, id [32]byte, age *big.Int) (PythStructsPrice, error)

GetEmaPriceNoOlderThan is a free data retrieval call binding the contract method 0x711a2e28.

Solidity: function getEmaPriceNoOlderThan(bytes32 id, uint256 age) view returns((int64,uint64,int32,uint256) price)

func (*ContractCaller) GetEmaPriceUnsafe

func (_Contract *ContractCaller) GetEmaPriceUnsafe(opts *bind.CallOpts, id [32]byte) (PythStructsPrice, error)

GetEmaPriceUnsafe is a free data retrieval call binding the contract method 0x9474f45b.

Solidity: function getEmaPriceUnsafe(bytes32 id) view returns((int64,uint64,int32,uint256) price)

func (*ContractCaller) GetPrice

func (_Contract *ContractCaller) GetPrice(opts *bind.CallOpts, id [32]byte) (PythStructsPrice, error)

GetPrice is a free data retrieval call binding the contract method 0x31d98b3f.

Solidity: function getPrice(bytes32 id) view returns((int64,uint64,int32,uint256) price)

func (*ContractCaller) GetPriceNoOlderThan

func (_Contract *ContractCaller) GetPriceNoOlderThan(opts *bind.CallOpts, id [32]byte, age *big.Int) (PythStructsPrice, error)

GetPriceNoOlderThan is a free data retrieval call binding the contract method 0xa4ae35e0.

Solidity: function getPriceNoOlderThan(bytes32 id, uint256 age) view returns((int64,uint64,int32,uint256) price)

func (*ContractCaller) GetPriceUnsafe

func (_Contract *ContractCaller) GetPriceUnsafe(opts *bind.CallOpts, id [32]byte) (PythStructsPrice, error)

GetPriceUnsafe is a free data retrieval call binding the contract method 0x96834ad3.

Solidity: function getPriceUnsafe(bytes32 id) view returns((int64,uint64,int32,uint256) price)

func (*ContractCaller) GetUpdateFee

func (_Contract *ContractCaller) GetUpdateFee(opts *bind.CallOpts, updateData [][]byte) (*big.Int, error)

GetUpdateFee is a free data retrieval call binding the contract method 0xd47eed45.

Solidity: function getUpdateFee(bytes[] updateData) view returns(uint256 feeAmount)

func (*ContractCaller) GetValidTimePeriod

func (_Contract *ContractCaller) GetValidTimePeriod(opts *bind.CallOpts) (*big.Int, error)

GetValidTimePeriod is a free data retrieval call binding the contract method 0xe18910a3.

Solidity: function getValidTimePeriod() view returns(uint256 validTimePeriod)

func (*ContractCaller) PriceFeedExists

func (_Contract *ContractCaller) PriceFeedExists(opts *bind.CallOpts, id [32]byte) (bool, error)

PriceFeedExists is a free data retrieval call binding the contract method 0xb5ec0261.

Solidity: function priceFeedExists(bytes32 id) view returns(bool exists)

func (*ContractCaller) QueryPriceFeed

func (_Contract *ContractCaller) QueryPriceFeed(opts *bind.CallOpts, id [32]byte) (PythStructsPriceFeed, error)

QueryPriceFeed is a free data retrieval call binding the contract method 0xcaaf43f1.

Solidity: function queryPriceFeed(bytes32 id) view returns((bytes32,(int64,uint64,int32,uint256),(int64,uint64,int32,uint256)) priceFeed)

type ContractCallerRaw

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

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

func (*ContractCallerRaw) Call

func (_Contract *ContractCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

type ContractCallerSession

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

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

func (*ContractCallerSession) GetEmaPrice

func (_Contract *ContractCallerSession) GetEmaPrice(id [32]byte) (PythStructsPrice, error)

GetEmaPrice is a free data retrieval call binding the contract method 0xb5dcc911.

Solidity: function getEmaPrice(bytes32 id) view returns((int64,uint64,int32,uint256) price)

func (*ContractCallerSession) GetEmaPriceNoOlderThan

func (_Contract *ContractCallerSession) GetEmaPriceNoOlderThan(id [32]byte, age *big.Int) (PythStructsPrice, error)

GetEmaPriceNoOlderThan is a free data retrieval call binding the contract method 0x711a2e28.

Solidity: function getEmaPriceNoOlderThan(bytes32 id, uint256 age) view returns((int64,uint64,int32,uint256) price)

func (*ContractCallerSession) GetEmaPriceUnsafe

func (_Contract *ContractCallerSession) GetEmaPriceUnsafe(id [32]byte) (PythStructsPrice, error)

GetEmaPriceUnsafe is a free data retrieval call binding the contract method 0x9474f45b.

Solidity: function getEmaPriceUnsafe(bytes32 id) view returns((int64,uint64,int32,uint256) price)

func (*ContractCallerSession) GetPrice

func (_Contract *ContractCallerSession) GetPrice(id [32]byte) (PythStructsPrice, error)

GetPrice is a free data retrieval call binding the contract method 0x31d98b3f.

Solidity: function getPrice(bytes32 id) view returns((int64,uint64,int32,uint256) price)

func (*ContractCallerSession) GetPriceNoOlderThan

func (_Contract *ContractCallerSession) GetPriceNoOlderThan(id [32]byte, age *big.Int) (PythStructsPrice, error)

GetPriceNoOlderThan is a free data retrieval call binding the contract method 0xa4ae35e0.

Solidity: function getPriceNoOlderThan(bytes32 id, uint256 age) view returns((int64,uint64,int32,uint256) price)

func (*ContractCallerSession) GetPriceUnsafe

func (_Contract *ContractCallerSession) GetPriceUnsafe(id [32]byte) (PythStructsPrice, error)

GetPriceUnsafe is a free data retrieval call binding the contract method 0x96834ad3.

Solidity: function getPriceUnsafe(bytes32 id) view returns((int64,uint64,int32,uint256) price)

func (*ContractCallerSession) GetUpdateFee

func (_Contract *ContractCallerSession) GetUpdateFee(updateData [][]byte) (*big.Int, error)

GetUpdateFee is a free data retrieval call binding the contract method 0xd47eed45.

Solidity: function getUpdateFee(bytes[] updateData) view returns(uint256 feeAmount)

func (*ContractCallerSession) GetValidTimePeriod

func (_Contract *ContractCallerSession) GetValidTimePeriod() (*big.Int, error)

GetValidTimePeriod is a free data retrieval call binding the contract method 0xe18910a3.

Solidity: function getValidTimePeriod() view returns(uint256 validTimePeriod)

func (*ContractCallerSession) PriceFeedExists

func (_Contract *ContractCallerSession) PriceFeedExists(id [32]byte) (bool, error)

PriceFeedExists is a free data retrieval call binding the contract method 0xb5ec0261.

Solidity: function priceFeedExists(bytes32 id) view returns(bool exists)

func (*ContractCallerSession) QueryPriceFeed

func (_Contract *ContractCallerSession) QueryPriceFeed(id [32]byte) (PythStructsPriceFeed, error)

QueryPriceFeed is a free data retrieval call binding the contract method 0xcaaf43f1.

Solidity: function queryPriceFeed(bytes32 id) view returns((bytes32,(int64,uint64,int32,uint256),(int64,uint64,int32,uint256)) priceFeed)

type ContractFilterer

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

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

func NewContractFilterer

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

NewContractFilterer creates a new log filterer instance of Contract, bound to a specific deployed contract.

func (*ContractFilterer) FilterPriceFeedUpdate

func (_Contract *ContractFilterer) FilterPriceFeedUpdate(opts *bind.FilterOpts, id [][32]byte) (*ContractPriceFeedUpdateIterator, error)

FilterPriceFeedUpdate is a free log retrieval operation binding the contract event 0xd06a6b7f4918494b3719217d1802786c1f5112a6c1d88fe2cfec00b4584f6aec.

Solidity: event PriceFeedUpdate(bytes32 indexed id, uint64 publishTime, int64 price, uint64 conf)

func (*ContractFilterer) ParsePriceFeedUpdate

func (_Contract *ContractFilterer) ParsePriceFeedUpdate(log types.Log) (*ContractPriceFeedUpdate, error)

ParsePriceFeedUpdate is a log parse operation binding the contract event 0xd06a6b7f4918494b3719217d1802786c1f5112a6c1d88fe2cfec00b4584f6aec.

Solidity: event PriceFeedUpdate(bytes32 indexed id, uint64 publishTime, int64 price, uint64 conf)

func (*ContractFilterer) WatchPriceFeedUpdate

func (_Contract *ContractFilterer) WatchPriceFeedUpdate(opts *bind.WatchOpts, sink chan<- *ContractPriceFeedUpdate, id [][32]byte) (event.Subscription, error)

WatchPriceFeedUpdate is a free log subscription operation binding the contract event 0xd06a6b7f4918494b3719217d1802786c1f5112a6c1d88fe2cfec00b4584f6aec.

Solidity: event PriceFeedUpdate(bytes32 indexed id, uint64 publishTime, int64 price, uint64 conf)

type ContractPriceFeedUpdate

type ContractPriceFeedUpdate struct {
	Id          [32]byte
	PublishTime uint64
	Price       int64
	Conf        uint64
	Raw         types.Log // Blockchain specific contextual infos
}

ContractPriceFeedUpdate represents a PriceFeedUpdate event raised by the Contract contract.

type ContractPriceFeedUpdateIterator

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

ContractPriceFeedUpdateIterator is returned from FilterPriceFeedUpdate and is used to iterate over the raw logs and unpacked data for PriceFeedUpdate events raised by the Contract contract.

func (*ContractPriceFeedUpdateIterator) Close

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

func (*ContractPriceFeedUpdateIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*ContractPriceFeedUpdateIterator) Next

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

type ContractRaw

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

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

func (*ContractRaw) Call

func (_Contract *ContractRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

func (*ContractRaw) Transact

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

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

func (*ContractRaw) Transfer

func (_Contract *ContractRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type ContractSession

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

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

func (*ContractSession) GetEmaPrice

func (_Contract *ContractSession) GetEmaPrice(id [32]byte) (PythStructsPrice, error)

GetEmaPrice is a free data retrieval call binding the contract method 0xb5dcc911.

Solidity: function getEmaPrice(bytes32 id) view returns((int64,uint64,int32,uint256) price)

func (*ContractSession) GetEmaPriceNoOlderThan

func (_Contract *ContractSession) GetEmaPriceNoOlderThan(id [32]byte, age *big.Int) (PythStructsPrice, error)

GetEmaPriceNoOlderThan is a free data retrieval call binding the contract method 0x711a2e28.

Solidity: function getEmaPriceNoOlderThan(bytes32 id, uint256 age) view returns((int64,uint64,int32,uint256) price)

func (*ContractSession) GetEmaPriceUnsafe

func (_Contract *ContractSession) GetEmaPriceUnsafe(id [32]byte) (PythStructsPrice, error)

GetEmaPriceUnsafe is a free data retrieval call binding the contract method 0x9474f45b.

Solidity: function getEmaPriceUnsafe(bytes32 id) view returns((int64,uint64,int32,uint256) price)

func (*ContractSession) GetPrice

func (_Contract *ContractSession) GetPrice(id [32]byte) (PythStructsPrice, error)

GetPrice is a free data retrieval call binding the contract method 0x31d98b3f.

Solidity: function getPrice(bytes32 id) view returns((int64,uint64,int32,uint256) price)

func (*ContractSession) GetPriceNoOlderThan

func (_Contract *ContractSession) GetPriceNoOlderThan(id [32]byte, age *big.Int) (PythStructsPrice, error)

GetPriceNoOlderThan is a free data retrieval call binding the contract method 0xa4ae35e0.

Solidity: function getPriceNoOlderThan(bytes32 id, uint256 age) view returns((int64,uint64,int32,uint256) price)

func (*ContractSession) GetPriceUnsafe

func (_Contract *ContractSession) GetPriceUnsafe(id [32]byte) (PythStructsPrice, error)

GetPriceUnsafe is a free data retrieval call binding the contract method 0x96834ad3.

Solidity: function getPriceUnsafe(bytes32 id) view returns((int64,uint64,int32,uint256) price)

func (*ContractSession) GetUpdateFee

func (_Contract *ContractSession) GetUpdateFee(updateData [][]byte) (*big.Int, error)

GetUpdateFee is a free data retrieval call binding the contract method 0xd47eed45.

Solidity: function getUpdateFee(bytes[] updateData) view returns(uint256 feeAmount)

func (*ContractSession) GetValidTimePeriod

func (_Contract *ContractSession) GetValidTimePeriod() (*big.Int, error)

GetValidTimePeriod is a free data retrieval call binding the contract method 0xe18910a3.

Solidity: function getValidTimePeriod() view returns(uint256 validTimePeriod)

func (*ContractSession) ParsePriceFeedUpdates

func (_Contract *ContractSession) ParsePriceFeedUpdates(updateData [][]byte, priceIds [][32]byte, minPublishTime uint64, maxPublishTime uint64) (*types.Transaction, error)

ParsePriceFeedUpdates is a paid mutator transaction binding the contract method 0x4716e9c5.

Solidity: function parsePriceFeedUpdates(bytes[] updateData, bytes32[] priceIds, uint64 minPublishTime, uint64 maxPublishTime) payable returns((bytes32,(int64,uint64,int32,uint256),(int64,uint64,int32,uint256))[] priceFeeds)

func (*ContractSession) ParsePriceFeedUpdatesUnique

func (_Contract *ContractSession) ParsePriceFeedUpdatesUnique(updateData [][]byte, priceIds [][32]byte, minPublishTime uint64, maxPublishTime uint64) (*types.Transaction, error)

ParsePriceFeedUpdatesUnique is a paid mutator transaction binding the contract method 0xaccca7f9.

Solidity: function parsePriceFeedUpdatesUnique(bytes[] updateData, bytes32[] priceIds, uint64 minPublishTime, uint64 maxPublishTime) payable returns((bytes32,(int64,uint64,int32,uint256),(int64,uint64,int32,uint256))[] priceFeeds)

func (*ContractSession) PriceFeedExists

func (_Contract *ContractSession) PriceFeedExists(id [32]byte) (bool, error)

PriceFeedExists is a free data retrieval call binding the contract method 0xb5ec0261.

Solidity: function priceFeedExists(bytes32 id) view returns(bool exists)

func (*ContractSession) QueryPriceFeed

func (_Contract *ContractSession) QueryPriceFeed(id [32]byte) (PythStructsPriceFeed, error)

QueryPriceFeed is a free data retrieval call binding the contract method 0xcaaf43f1.

Solidity: function queryPriceFeed(bytes32 id) view returns((bytes32,(int64,uint64,int32,uint256),(int64,uint64,int32,uint256)) priceFeed)

func (*ContractSession) UpdatePriceFeeds

func (_Contract *ContractSession) UpdatePriceFeeds(updateData [][]byte) (*types.Transaction, error)

UpdatePriceFeeds is a paid mutator transaction binding the contract method 0xef9e5e28.

Solidity: function updatePriceFeeds(bytes[] updateData) payable returns()

func (*ContractSession) UpdatePriceFeedsIfNecessary

func (_Contract *ContractSession) UpdatePriceFeedsIfNecessary(updateData [][]byte, priceIds [][32]byte, publishTimes []uint64) (*types.Transaction, error)

UpdatePriceFeedsIfNecessary is a paid mutator transaction binding the contract method 0xb9256d28.

Solidity: function updatePriceFeedsIfNecessary(bytes[] updateData, bytes32[] priceIds, uint64[] publishTimes) payable returns()

type ContractTransactor

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

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

func NewContractTransactor

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

NewContractTransactor creates a new write-only instance of Contract, bound to a specific deployed contract.

func (*ContractTransactor) ParsePriceFeedUpdates

func (_Contract *ContractTransactor) ParsePriceFeedUpdates(opts *bind.TransactOpts, updateData [][]byte, priceIds [][32]byte, minPublishTime uint64, maxPublishTime uint64) (*types.Transaction, error)

ParsePriceFeedUpdates is a paid mutator transaction binding the contract method 0x4716e9c5.

Solidity: function parsePriceFeedUpdates(bytes[] updateData, bytes32[] priceIds, uint64 minPublishTime, uint64 maxPublishTime) payable returns((bytes32,(int64,uint64,int32,uint256),(int64,uint64,int32,uint256))[] priceFeeds)

func (*ContractTransactor) ParsePriceFeedUpdatesUnique

func (_Contract *ContractTransactor) ParsePriceFeedUpdatesUnique(opts *bind.TransactOpts, updateData [][]byte, priceIds [][32]byte, minPublishTime uint64, maxPublishTime uint64) (*types.Transaction, error)

ParsePriceFeedUpdatesUnique is a paid mutator transaction binding the contract method 0xaccca7f9.

Solidity: function parsePriceFeedUpdatesUnique(bytes[] updateData, bytes32[] priceIds, uint64 minPublishTime, uint64 maxPublishTime) payable returns((bytes32,(int64,uint64,int32,uint256),(int64,uint64,int32,uint256))[] priceFeeds)

func (*ContractTransactor) UpdatePriceFeeds

func (_Contract *ContractTransactor) UpdatePriceFeeds(opts *bind.TransactOpts, updateData [][]byte) (*types.Transaction, error)

UpdatePriceFeeds is a paid mutator transaction binding the contract method 0xef9e5e28.

Solidity: function updatePriceFeeds(bytes[] updateData) payable returns()

func (*ContractTransactor) UpdatePriceFeedsIfNecessary

func (_Contract *ContractTransactor) UpdatePriceFeedsIfNecessary(opts *bind.TransactOpts, updateData [][]byte, priceIds [][32]byte, publishTimes []uint64) (*types.Transaction, error)

UpdatePriceFeedsIfNecessary is a paid mutator transaction binding the contract method 0xb9256d28.

Solidity: function updatePriceFeedsIfNecessary(bytes[] updateData, bytes32[] priceIds, uint64[] publishTimes) payable returns()

type ContractTransactorRaw

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

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

func (*ContractTransactorRaw) Transact

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

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

func (*ContractTransactorRaw) Transfer

func (_Contract *ContractTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type ContractTransactorSession

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

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

func (*ContractTransactorSession) ParsePriceFeedUpdates

func (_Contract *ContractTransactorSession) ParsePriceFeedUpdates(updateData [][]byte, priceIds [][32]byte, minPublishTime uint64, maxPublishTime uint64) (*types.Transaction, error)

ParsePriceFeedUpdates is a paid mutator transaction binding the contract method 0x4716e9c5.

Solidity: function parsePriceFeedUpdates(bytes[] updateData, bytes32[] priceIds, uint64 minPublishTime, uint64 maxPublishTime) payable returns((bytes32,(int64,uint64,int32,uint256),(int64,uint64,int32,uint256))[] priceFeeds)

func (*ContractTransactorSession) ParsePriceFeedUpdatesUnique

func (_Contract *ContractTransactorSession) ParsePriceFeedUpdatesUnique(updateData [][]byte, priceIds [][32]byte, minPublishTime uint64, maxPublishTime uint64) (*types.Transaction, error)

ParsePriceFeedUpdatesUnique is a paid mutator transaction binding the contract method 0xaccca7f9.

Solidity: function parsePriceFeedUpdatesUnique(bytes[] updateData, bytes32[] priceIds, uint64 minPublishTime, uint64 maxPublishTime) payable returns((bytes32,(int64,uint64,int32,uint256),(int64,uint64,int32,uint256))[] priceFeeds)

func (*ContractTransactorSession) UpdatePriceFeeds

func (_Contract *ContractTransactorSession) UpdatePriceFeeds(updateData [][]byte) (*types.Transaction, error)

UpdatePriceFeeds is a paid mutator transaction binding the contract method 0xef9e5e28.

Solidity: function updatePriceFeeds(bytes[] updateData) payable returns()

func (*ContractTransactorSession) UpdatePriceFeedsIfNecessary

func (_Contract *ContractTransactorSession) UpdatePriceFeedsIfNecessary(updateData [][]byte, priceIds [][32]byte, publishTimes []uint64) (*types.Transaction, error)

UpdatePriceFeedsIfNecessary is a paid mutator transaction binding the contract method 0xb9256d28.

Solidity: function updatePriceFeedsIfNecessary(bytes[] updateData, bytes32[] priceIds, uint64[] publishTimes) payable returns()

type PythStructsPrice

type PythStructsPrice struct {
	Price       int64
	Conf        uint64
	Expo        int32
	PublishTime *big.Int
}

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

type PythStructsPriceFeed

type PythStructsPriceFeed struct {
	Id       [32]byte
	Price    PythStructsPrice
	EmaPrice PythStructsPrice
}

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

Jump to

Keyboard shortcuts

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