Using Laika with Web3 Node Providers
Here: Exploring Laika with Quicknode
Last updated
Here: Exploring Laika with Quicknode
Last updated
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
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:
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: 0x313d7d082bf8A76a16277955b61c1dFaC5Aff8AD (WETH Address). Make sure to select "Ethereum Sepolia" 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
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: 0x5C314eCB105F3e7A78BD19EE86823e44fd81D3DF, then click Send.
You'll get the following response:
There you have it! We just made a request using Laika and a Web3 Node Provider (QuickNode)!