Code Monkey home page Code Monkey logo

hardhat-sourcify's Introduction

hardhat-sourcify

Verify smart contracts with Sourcify using Hardhat.

Install

  • install plugin
yarn add -D @xtools-at/hardhat-sourcify
  • import plugin in hardhat.config
import "@xtools-at/hardhat-sourcify";
// or
require("@xtools-at/hardhat-sourcify");
  • CLI help
npx hardhat help verify-sourcify

Use

  • verify contract NFT in contracts/NFT.sol:
npx hardhat --network beam verify-sourcify --contract "NFT" --address 0x12345...
  • verify contract NFT in contracts/NFT.sol, overriding the network's chain id:
npx hardhat verify-sourcify --chain-id 4337 --contract "NFT" --address 0x12345...
  • verify contract NFT in contracts/extensions/NFT.sol:
npx hardhat --network beam verify-sourcify --contract "NFT" --path "extensions" --address 0x12345...
  • verify contract NFT in contracts/extensions/OtherFilename.sol:
npx hardhat --network beam verify-sourcify --contract "NFT" --path "extensions/OtherFilename.sol" --address 0x12345...
  • verify contract NFT in contracts-custom42/extensions/NFT.sol:
npx hardhat --network beam verify-sourcify --contract "NFT" --full-path "contracts-custom42/extensions/NFT.sol" --address 0x12345...

Build and publish lib

  • sign up and get access token from npmjs

via Github actions

  • add NPM_TOKEN to Github actions secrets
  • create a Github access token and add it to the secrets as RELEASE_TOKEN
  • bump the package version in package.json
  • add annotated tag to branch:
git tag -a v0.2.0 -m "release 0.2.0"
  • push all tags
git push origin master --follow-tags

manually

  • install Node.js v16+
  • install repo dependencies using npm i (not yarn)
  • add a .npmrc file to the project root, with the following contents:
//registry.npmjs.org/:_authToken=YourNpmAccessTokenGoesHere
registry=https://registry.npmjs.org/
  • bump the package version in package.json
  • build the package
npm run build
  • publish to npm
npm publish --access public

History

0.2.0

  • new streamlined interface (backwards compatible), less typing necessary

0.1.1 - 0.1.2

  • fixed minor build issue with yarn, improved log messages

0.1.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.