Laika Blockchain Lab
Search…
⌃K

Using Laika with Web3 Node Providers

Here: Exploring Laika with Quicknode

Overview

This guide will demonstrate how to interact with smart contracts in Laika using QuickNode. This process can be reproduced to work with any other Provider of your choice as well!
Prerequisites
  • An Ethereum Node
  • Basic understanding of Smart Contracts and Node control

Getting Started with the Node Provider

Step 1 - Launching the Node Provider

For the purpose of this tutorial, we've used Quicknode as our node provider. Simply register for a node on Quicknode, select your preferred subscription plan and then boot up your preferred node through the Dashboard (here, we'll be using a node on the Kovan Testnet). Follow the specific instructions from other platforms if you are not using Quicknode.
We will need the HTTP Provider URL for this tutorial, so keep this URL handy. It should look something like this:

Step 2 - Setting up Your Laika Workspace

Now that we have our blockchain infrastructure ready to go, we can move on to querying blockchain data using Laika.
First, we will have to configure Laika with our QuickNode endpoint and mnemonic phrase. If you don't have a mnemonic handy, don't worry, Laika automatically generates a test wallet for you to use. Click the Connect button in the top right corner and then click Web3 Provider.
Input your QuickNode URL and click Connect:
Once our wallet and node are connected, click the New button in the top left corner of the page.
Then, depending on how you want to import your contract, you can click "Upload JSON ABI", or "Plain text ABI" to import a smart contract via ABI. Alternatively, if the smart contract is already verified on Etherscan, you can use the "Chain Explorer" option to input a smart contract address and Laika will automatically fetch the ABI for you.
For this guide, we will use the "Chain Explorer" option and the following smart contract address: 0xd0A1E359811322d97991E03f863a0C30C2cF029C (WETH Address). Make sure to select "Ethereum Kovan" from the "Chain" dropdown. Then, click "import", and you should see the smart contract loaded on the collections panel under "New Imported ABIs from..".
You can read more about Importing Requests at Create a New Request​

Step 3 - Making Requests with Laika

We have our smart contract loaded. Now all that's left to do is start interacting with the blockchain!
Click the balanceOf function to see more details about the function such as the parameters required, response expected and etc. We see that this function has one required parameter which expects an address. Use the following address in the Value1 field: 0x2ED0fE9a8FbB3b7f0ffC45a18eff8f0c3A0ABE2C, then click Send.
You'll get the following response:
[
{
"name": "",
"type": "uint256",
"value": "100000000000000000"
}
]
There you have it! We just made a request using Laika and a Web3 Node Provider (QuickNode)!