DataStreamsLocalSimulatorFork v0.3.0 API Reference
DataStreamsLocalSimulatorFork
Data Streams simulator for forked networks.
Variables
i_register
The immutable register instance
Register immutable i_register
LINK_FAUCET
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
| Name | Type | Description |
|---|---|---|
chainId | uint256 | - The blockchain network chain ID. For example 11155111 for Ethereum Sepolia. |
Returns
| Name | Type | Description |
|---|---|---|
<none> | Register.NetworkDetails | networkDetails - 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
| Name | Type | Description |
|---|---|---|
to | address | - The address to which LINK tokens are to be sent. |
amount | uint256 | - The amount of LINK tokens to send. |
Returns
| Name | Type | Description |
|---|---|---|
success | bool | - 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
| Name | Type | Description |
|---|---|---|
to | address | - The address to which native coins are to be sent. |
amount | uint256 | - 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
| Name | Type | Description |
|---|---|---|
chainId | uint256 | - The blockchain network chain ID. For example 11155111 for Ethereum Sepolia. |
networkDetails | Register.NetworkDetails | - The tuple containing: verifierProxyAddress - The address of the Verifier Proxy smart contract. linkAddress - The address of the LINK token. |