API Version: v0.3.1

DataStreamsLocalSimulator v0.3.1 API Reference

DataStreamsLocalSimulator

A contract that simulates local Data Streams operations for testing and development purposes.

DataStreamsLocalSimulator

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

ParameterTypeDescription
wrappedNative_WETH9The wrapped native token
linkToken_LinkTokenThe LINK token
mockVerifier_MockVerifierThe mock verifier contract
mockVerifierProxy_MockVerifierProxyThe mock verifier proxy contract
mockFeeManager_MockFeeManagerThe mock fee manager contract (what is currently set on the verifier proxy)
mockRewardManager_MockRewardManagerThe 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

ParameterTypeDescription
toaddressThe address to which LINK tokens are to be sent
amountuint256The amount of LINK tokens to send

Returns

ParameterTypeDescription
successboolReturns true if the transfer of tokens was successful

Get the latest Chainlink content straight to your inbox.