Retrieve information from NEAR protocol via NEAR RPC API.
Bricks → Blockchain Connectors → NEAR Fetch
RPC
Select NEAR Protocol networks, each operating with its independent validators and unique state. Users may choose between testnet and mainnet:
Contract / Account Name
Address of the smart-contract or account to get information about
Request Type
RPC API enables users to view details about accounts and contracts as well as perform contract calls to fetch the data. The NEAR Fetch brick supports two types of request types - View Account and Call Function.
Method
An optional argument should be defined if “Request Type” is “Call Function”.
Retry After
The time between requests calls in case of fail - 0 by default
Number of retries
The number of attempts to make a request - 0 by default
Arguments
Arguments for NEAR fetch Call Function request.
Type
Static or Dynamic. Static - to submit arguments as JSON, and Dynamic to fill in. arguments from the input data
JSON
NEAR fetch request’s arguments in case of Static type of the arguments.
Inputs
Optional. Brick takes the dataset with the request’s arguments when the type of the arguments is Dynamic.
Outputs
Brick produces the dataset with the NEAR fetch request’s result.
Let’s have a look at the usage of the NEAR Fetch Brick.
For instance, we need to get a NEAR balance for the nearcrowd.near account. In this case we may take NEAR Fetch brick and configure it as: