API Version: v0.2.6 Not using latest version (v0.3.1)

DataStreamsLocalSimulatorFork v0.2.6 API Reference

DataStreamsLocalSimulatorFork

Data Streams simulator for forked networks.

DataStreamsLocalSimulatorFork

Variables

i_register

contract Register i_register

The immutable register instance

address LINK_FAUCET

The address of the LINK faucet

Functions

constructor

constructor() public

Constructor to initialize the contract

getNetworkDetails

function getNetworkDetails(uint256 chainId) external view returns (struct Register.NetworkDetails)

Returns the default values for currently Data Streams supported networks. If network is not present or some of the values are changed, user can manually add new network details using the setNetworkDetails function.

Parameters

NameTypeDescription
chainIduint256- The blockchain network chain ID. For example 11155111 for Ethereum Sepolia.

Returns

NameTypeDescription
[0]struct Register.NetworkDetailsnetworkDetails - The tuple containing: verifierProxyAddress - The address of the Verifier Proxy smart contract. linkAddress - The address of the LINK token.

requestLinkFromFaucet

function requestLinkFromFaucet(address to, uint256 amount) external returns (bool success)

Requests LINK tokens from the faucet. The provided amount of tokens are transferred to provided destination address.

Parameters

NameTypeDescription
toaddress- The address to which LINK tokens are to be sent.
amountuint256- The amount of LINK tokens to send.

Returns

NameTypeDescription
successbool- Returns true if the transfer of tokens was successful, otherwise false.

requestNativeFromFaucet

function requestNativeFromFaucet(address to, uint256 amount) external

Requests native coints from the faucet.

Parameters

NameTypeDescription
toaddress- The address to which native coins are to be sent.
amountuint256- The amount of native coins to send.

setNetworkDetails

function setNetworkDetails(uint256 chainId, struct Register.NetworkDetails networkDetails) external

If network details are not present or some of the values are changed, user can manually add new network details using the setNetworkDetails function.

Parameters

NameTypeDescription
chainIduint256- The blockchain network chain ID. For example 11155111 for Ethereum Sepolia.
networkDetailsstruct Register.NetworkDetails- The tuple containing: verifierProxyAddress - The address of the Verifier Proxy smart contract. linkAddress - The address of the LINK token.

Get the latest Chainlink content straight to your inbox.