Using Laika with Web3 Node Providers
Here: Exploring Laika with Quicknode
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!
- 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:
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..".
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:
There you have it! We just made a request using Laika and a Web3 Node Provider (QuickNode)!