DataStreamsLocalSimulator v0.3.1 API Reference
DataStreamsLocalSimulator
A contract that simulates local Data Streams operations for testing and development purposes.
Variables
feeManagerEnabled
bool public feeManagerEnabled
Functions
configuration
Returns the 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
| Parameter | 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 (what is currently set on the verifier proxy) |
| mockRewardManager_ | MockRewardManager | The mock reward manager contract (address(0) if fee manager is disabled) |
constructor
Initializes the contract with pre-deployed instances.
constructor()
enableOffChainBilling
Enables the off-chain billing mechanism by removing the fee manager.
function enableOffChainBilling() external
enableOnChainBilling
Enables the on-chain billing mechanism by deploying/setting the fee manager.
function enableOnChainBilling() external
getBillingMechanism
Returns the current billing mechanism type.
function getBillingMechanism() external view returns (string memory billingType)
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 which LINK tokens are to be sent |
| amount | uint256 | The amount of LINK tokens to send |
Returns
| Parameter | Type | Description |
|---|---|---|
| success | bool | Returns true if the transfer of tokens was successful |