Skip to content

Examples of using 0xweb with Hardhat: Demonstrates integration, contract interaction, and CI pipeline for publishing the 0xweb package.

Notifications You must be signed in to change notification settings

0xweb-org/examples-hardhat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

0xweb examples: Hardhat

This repository demonstrates how 0xweb can be used in Hardhat development process. It also serves as a CI pipeline for publishing the 0xweb package, streamlining the development and deployment process.

Further reading https://github.com/NomicFoundation/hardhat/blob/main/docs/src/content/hardhat-runner/docs/advanced/using-0xweb.md


CircleCI

1. Prepare the Project

Install the 0xweb package and initialize the project with Hardhat:

npm i 0xweb
npx 0xweb init --hardhat

Update the configuration to generate JavaScript modules instead of TypeScript classes (default):

npx 0xweb config --set settings.generate.target=mjs
2. Start Hardhat development server and compile the contracts

Start the Hardhat node and compile your contracts. This will also generate MyToken classes in the ./0xc/hardhat/ directory:

npx hardhat node
# Generates also MyToken classes in ./0xc/hardhat/
npx hardhat compile
3. Execute the Script

Run the script to:

  • Deploy the contract (if not already deployed),
  • Read data from the contract, and
  • Update data in the contract:
node scripts/contracts.mjs

🏁 0xweb.org

About

Examples of using 0xweb with Hardhat: Demonstrates integration, contract interaction, and CI pipeline for publishing the 0xweb package.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published