DataStreamsLocalSimulatorFork v0.3.1 API Reference
DataStreamsLocalSimulatorFork
A contract that simulates Data Streams operations on forked networks in a Foundry test environment.
Variables
i_register
Register immutable i_register
LINK_FAUCET
address constant LINK_FAUCET = 0x4281eCF07378Ee595C564a59048801330f3084eE
Functions
constructor
Initializes the contract.
constructor()
getNetworkDetails
Returns the default values for currently Data Streams supported networks.
function getNetworkDetails(uint256 chainId) external view returns (Register.NetworkDetails memory)
Parameters
| Parameter | Type | Description |
|---|---|---|
| chainId | uint256 | The blockchain network chain ID (e.g., 421614 for Arbitrum Sepolia) |
Returns
| Parameter | Type | Description |
|---|---|---|
| networkDetails | NetworkDetails | verifierProxyAddress and linkAddress for the specified chain |
setNetworkDetails
Sets the network details for a given chain ID.
function setNetworkDetails(uint256 chainId, Register.NetworkDetails memory networkDetails) external
Parameters
| Parameter | Type | Description |
|---|---|---|
| chainId | uint256 | The blockchain network chain ID |
| networkDetails | NetworkDetails | The network details to set for the specified chain ID |
requestLinkFromFaucet
Requests LINK tokens from the faucet.
function requestLinkFromFaucet(address to, uint256 amount) external returns (bool success)
Parameters
| Parameter | Type | Description |
|---|---|---|
| to | address | The address to receive the LINK tokens |
| amount | uint256 | The amount of LINK tokens to transfer |
Returns
| Parameter | Type | Description |
|---|---|---|
| success | bool | Returns true if the token transfer was successful |
requestNativeFromFaucet
Requests native coins from the faucet.
function requestNativeFromFaucet(address to, uint256 amount) external
Parameters
| Parameter | Type | Description |
|---|---|---|
| to | address | The address to receive the native coins |
| amount | uint256 | The amount of native coins to send |