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

DataStreamsLocalSimulatorFork v0.3.0 API Reference

DataStreamsLocalSimulatorFork

Data Streams simulator for forked networks.

DataStreamsLocalSimulatorFork

Variables

i_register

The immutable register instance

Register immutable i_register

The address of the LINK faucet

address constant LINK_FAUCET = 0x4281eCF07378Ee595C564a59048801330f3084eE

Functions

constructor

Constructor to initialize the contract

constructor() ;

getNetworkDetails

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.

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

Parameters

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

Returns

NameTypeDescription
<none>Register.NetworkDetailsnetworkDetails - The tuple containing: verifierProxyAddress - The address of the Verifier Proxy smart contract. linkAddress - The address of the LINK token.

requestLinkFromFaucet

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

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

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

Requests native coints from the faucet.

function requestNativeFromFaucet(address to, uint256 amount) external;

Parameters

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

setNetworkDetails

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

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

Parameters

NameTypeDescription
chainIduint256- The blockchain network chain ID. For example 11155111 for Ethereum Sepolia.
networkDetailsRegister.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.