cds-amal / StringYul-hh

Test a pure Yul contract with Hardhat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sample Hardhat Project

This project demonstrates how to test a pure Yul contract with Hardhat. It build on the basic Hardhat use case. It comes with:

  • a sample contract which simulates setting and getting a string from a contract.
  • test for that contract npx hardhat test
  • a deployment script `
  • TypeScript (main branch) and Javascript (javascript branch)

This builds on @tovarishfin/hardhat-yul's plugin, modified here which introduces a mechanism to inject the Yul's contract's ABI (See hardhat.config.ts)

Try running the following task:

npx hardhat typechain  # generate types from abi
npx hardhat test       # run tests
npx hardhat run scripts/deploy.ts --network localhost  # deploy to local network

About

Test a pure Yul contract with Hardhat


Languages

Language:Yul 73.8%Language:TypeScript 26.2%