0xSpaceShard/starknet-hardhat-plugin

Restructure the plugin to rely on Starknet.js

ivpavici opened this issue · 2 comments

Originally, the Hardhat Plugin was designed as a wrapper around the official Starknet CLI, since back then that was the only option to reliably interact with the network.

Now, Starknet CLI will be deprecated soon, and also Starknet.js is mature enough to replace all of the functionalities of the CLI.

This will be a major change, a lot of code could be deleted (and open issues closed). Maintenance will also be a lot easier.

This is actually the way Hardhat works on Ethereum - it relies on Ethers.js for interactions with the Ethereum blockchain, so the community should not be surprised with this change.

A migration guide should also be written.

There are two things to do, maybe it could be seen as two stages:

  1. Related to #140, we can just replace the current Starknet CLI logic with starknet.js
  2. Remove our custom Contract and Account abstraction, making the users rely on starknet.js only.
    1. Would we need to change our compilation artifacts to match those required by starknet.js?
    2. How should we connect the network specifications from hardhat.config.ts and CLI (--starknet-network parameter of hardhat test) with the network provider of starknet.js?

I would use the opportunity once this is done to introduce other breaking issues as well, marked by the breaking tag