contracts

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FluxAggregatorName is the name of Chainlink's Ethereum contract for
	// aggregating numerical data such as prices.
	FluxAggregatorName = "FluxAggregator"
)

Variables

View Source
var (
	// AggregatorNewRoundLogTopic20191220 is the NewRound filter topic for
	// the FluxAggregator as of Dec. 20th 2019. Eagerly fails if not found.
	AggregatorNewRoundLogTopic20191220 = eth.MustGetV6ContractEventID("FluxAggregator", "NewRound")
	// AggregatorAnswerUpdatedLogTopic20191220 is the AnswerUpdated filter topic for
	// the FluxAggregator as of Dec. 20th 2019. Eagerly fails if not found.
	AggregatorAnswerUpdatedLogTopic20191220 = eth.MustGetV6ContractEventID("FluxAggregator", "AnswerUpdated")
)

Functions

func NewFlagsDecodingLogListener added in v0.9.0

func NewFlagsDecodingLogListener(
	contract *Flags,
	innerListener log.Listener,
) log.Listener

Types

type ConnectedContract added in v0.9.9

type ConnectedContract interface {
	eth.ContractCodec
	Call(result interface{}, methodName string, args ...interface{}) error
	SubscribeToLogs(listener log.Listener) (connected bool, _ UnsubscribeFunc)
}

func NewConnectedContract added in v0.9.9

func NewConnectedContract(
	codec eth.ContractCodec,
	address common.Address,
	ethClient eth.Client,
	logBroadcaster log.Broadcaster,
) ConnectedContract

type Flags added in v0.9.0

type Flags struct {
	Address common.Address
	flags_wrapper.Flags
}

func NewFlagsContract added in v0.9.0

func NewFlagsContract(address common.Address, backend bind.ContractBackend) (*Flags, error)

type FluxAggregator

type FluxAggregator interface {
	ConnectedContract
	RoundState(oracle common.Address, roundID uint32) (FluxAggregatorRoundState, error)
	GetOracles() ([]common.Address, error)
	LatestRoundData() (FluxAggregatorRoundData, error)
}

func NewFluxAggregator

func NewFluxAggregator(address common.Address, ethClient eth.Client, logBroadcaster log.Broadcaster) (FluxAggregator, error)

type FluxAggregatorRoundData added in v0.9.7

type FluxAggregatorRoundData struct {
	RoundID         *big.Int `abi:"roundId" json:"reportableRoundID"`
	Answer          *big.Int `abi:"answer" json:"latestAnswer,omitempty"`
	StartedAt       *big.Int `abi:"startedAt" json:"startedAt"`
	UpdatedAt       *big.Int `abi:"updatedAt" json:"updatedAt"`
	AnsweredInRound *big.Int `abi:"answeredInRound" json:"availableFunds,omitempty"`
}

type FluxAggregatorRoundState

type FluxAggregatorRoundState struct {
	ReportableRoundID uint32   `abi:"_roundId" json:"reportableRoundID"`
	EligibleToSubmit  bool     `abi:"_eligibleToSubmit" json:"eligibleToSubmit"`
	LatestAnswer      *big.Int `abi:"_latestSubmission" json:"latestAnswer,omitempty"`
	Timeout           uint64   `abi:"_timeout" json:"timeout"`
	StartedAt         uint64   `abi:"_startedAt" json:"startedAt"`
	AvailableFunds    *big.Int `abi:"_availableFunds" json:"availableFunds,omitempty"`
	PaymentAmount     *big.Int `abi:"_paymentAmount" json:"paymentAmount,omitempty"`
	OracleCount       uint8    `abi:"_oracleCount" json:"oracleCount"`
}

func (FluxAggregatorRoundState) TimesOutAt

func (rs FluxAggregatorRoundState) TimesOutAt() uint64

type LogAnswerUpdated

type LogAnswerUpdated struct {
	types.Log
	Current   *big.Int
	RoundId   *big.Int
	UpdatedAt *big.Int
}

type LogNewRound

type LogNewRound struct {
	types.Log
	RoundId   *big.Int
	StartedBy common.Address
	// seconds since unix epoch
	StartedAt *big.Int
}

type UnsubscribeFunc added in v0.9.9

type UnsubscribeFunc func()

Jump to

Keyboard shortcuts

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