Inspiration

Getting small smart contracts deployed on VeChain required sometimes more energy than programming. The barrier and copy & pasta to get started felt like wasting energy.

What it does

It is a plugin that can be installed and configured in less than a minute. It allows to deploy and interaction with smart contracts within the hardhat development environment.

How we built it

It wraps existing libraries and tries to do as less as possible by passing data only between different modules. It makes use of the new web3-providers-connex module and is based on a standard hardhat-plugin template.

Challenges we ran into

At it was a collection of scripts with nearly 1,000 lines of code that generated, signed and submitted transactions manually. Handling the specifics was quite challenging. With the availability of the module web3-providers-connex it was reduced to learn about the interfaces of hre.ethers within hardhat. How and where they are used.

Accomplishments that we're proud of

  • The simplicity of the code. With now ca. 100 lines of code the responsibility is passed between all modules and ensures that not too much new complexity is introduced.
  • How easy it is to start and deploy contracts. Especially with the support of fee delegation it works "out of the box".

What we learned

The internals of ethers/providers and their interfaces. What they do and their responsibility. A lot about building transactions and building transaction data with and without function calls manually.

What's next for hardhat-thor

Transferring the learnings to truffle and build a plugin for the truffle ecosystem.

Built With

Share this project:

Updates