DataStreamsLocalSimulator v0.3.0 API Reference
DataStreamsLocalSimulator
Local Data Streams simulator (no-fork mode).
Variables
feeManagerEnabled
Whether fee manager is enabled (can be toggled after deployment)
bool public feeManagerEnabled
i_linkToken
The LINK token instance
LinkToken internal immutable i_linkToken
i_wrappedNative
The wrapped native token instance
WETH9 internal immutable i_wrappedNative
s_mockFeeManager
MockFeeManager internal s_mockFeeManager
s_mockRewardManager
MockRewardManager internal s_mockRewardManager
s_mockVerifier
MockVerifier internal s_mockVerifier
s_mockVerifierProxy
MockVerifierProxy internal s_mockVerifierProxy
Functions
_deployFeeManager
Internal function to deploy fee manager and reward manager
function _deployFeeManager() private;
configuration
Returns configuration details for pre-deployed contracts and services needed for local Data Streams simulations.
function configuration()
public
view
returns (
WETH9 wrappedNative_,
LinkToken linkToken_,
MockVerifier mockVerifier_,
MockVerifierProxy mockVerifierProxy_,
MockFeeManager mockFeeManager_,
MockRewardManager mockRewardManager_
);
Returns
| Name | Type | Description |
|---|---|---|
wrappedNative_ | WETH9 | - The wrapped native token. |
linkToken_ | LinkToken | - The LINK token. |
mockVerifier_ | MockVerifier | - The mock verifier contract. |
mockVerifierProxy_ | MockVerifierProxy | - The mock verifier proxy contract. |
mockFeeManager_ | MockFeeManager | - The mock fee manager contract (returns what's currently set on verifier proxy). |
mockRewardManager_ | MockRewardManager | - The mock reward manager contract (address(0) if fee manager is disabled). |
constructor
constructor() ;
enableOffChainBilling
Enables off-chain billing mechanism by removing fee manager
This simulates chains that don't have FeeManager contracts deployed
function enableOffChainBilling() external;
enableOnChainBilling
Enables on-chain billing mechanism by deploying/setting fee manager
This simulates chains that have FeeManager contracts deployed
function enableOnChainBilling() external;
getBillingMechanism
Returns the current billing mechanism type
function getBillingMechanism() external view returns (string memory billingType);
Returns
| Name | Type | Description |
|---|---|---|
billingType | string | "on-chain" if fee manager is enabled, "off-chain" if disabled |
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. |