Documentation ¶
Overview ¶
Package chainlinktest provides test doubles for Chainlinks's VRF.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type VRFCoordinator ¶
type VRFCoordinator struct {
// contains filtered or unexported fields
}
A VRFCoordinator fulfils requests for randomness, listening for events emitted by the mocked contract. Fulmilment occurs in a new transaction, and the WaitFulfilled*() methods can be used to block until this occurs.
func DeployAll ¶
func DeployAll(sim *ethtest.SimulatedBackend) (*VRFCoordinator, error)
DeployAll deploys all Chainlink test doubles to the backend and returns a VRFCoordinator responding to requests. To release resources, Close() must be called when the coordinator is no longer needed.
func DeployAllTB ¶
func DeployAllTB(tb testing.TB, sim *ethtest.SimulatedBackend) *VRFCoordinator
DeployAllTB calls DeployAll(), reporting any errors on tb.Fatal. There is no need to call Close() on the returned coordinator as this is done by a tb.Cleanup() function.
func (*VRFCoordinator) Close ¶
func (c *VRFCoordinator) Close() error
Close releases all coordinator resources. After the call returns, further requests for randomness will not be fulfilled. The first error that occurred while the coordinator was listening for requests, if one occurred, will be returned.
func (*VRFCoordinator) WaitFulfilled ¶
func (c *VRFCoordinator) WaitFulfilled() error
WaitFulfilled blocks until the last request for randomness is fulfilled.
func (*VRFCoordinator) WaitFulfilledTB ¶
func (c *VRFCoordinator) WaitFulfilledTB(tb testing.TB)
WaitFulfilledTB calls WaitFulfilled() and reports any errors on tb.Fatal.
Directories ¶
Path | Synopsis |
---|---|
Package chainlinktestabi is a generated package providing test doubles and real implementations of Chainlink contracts.
|
Package chainlinktestabi is a generated package providing test doubles and real implementations of Chainlink contracts. |