hardhat-laika is Laika's own Hardhat plugin that helps you sync your compiled contracts with Laika. This enables you to make a request without having to write a single line of extra code.
In counterview, it also boosts your performance when developing with Hardhat! 💪
Let’s try it out!
First, we are going to start a new Hardhat project using
npx hardhat init
Then, pick a configuration you like (We'll be usingthis configuration and Greeter.sol as an example contract in this guiding example)
√ What do you want to do? · Create a basic sample project
√ Hardhat project root: · /path/to/project/
√ Do you want to add a .gitignore? (Y/n) · y
√ Do you want to install this sample project's dependencies with npm (...)? (Y/n) · y
After the project setup is completed, let’s install hardhat-laika by using
npm i hardhat-laika
Now, import it to your hardhat.config.js By adding a require(…) statement at the top
Alright, now we’re all set! Let’s try to use it!
There are two ways to use hardhat-laika, viz.
1.
through the command line
2.
through your own scripts (by defining a hardhat-laika task)
Let’s try the first way.
1.
The Hardhat Runner CLI
First, Let’s compile our contract so we can get the ABIs.