Improved fork of zoey-t's Sourcify contract verification plugin for Hardhat
npm install @xtools-at/hardhat-sourcify- install plugin
``shell`
yarn add -D @xtools-at/hardhat-sourcifyhardhat.config
- import plugin in `typescript`
import "@xtools-at/hardhat-sourcify";
// or
require("@xtools-at/hardhat-sourcify");`
- CLI helpshell`
npx hardhat help verify-sourcify
- verify contract NFT in contracts/NFT.sol:`shell`
npx hardhat --network beam verify-sourcify --contract "NFT" --address 0x12345...NFT
- verify contract in contracts/NFT.sol, overriding the network's chain id:`shell`
npx hardhat verify-sourcify --chain-id 4337 --contract "NFT" --address 0x12345...NFT
- verify contract in contracts/extensions/NFT.sol:`shell`
npx hardhat --network beam verify-sourcify --contract "NFT" --path "extensions" --address 0x12345...NFT
- verify contract in contracts/extensions/OtherFilename.sol:`shell`
npx hardhat --network beam verify-sourcify --contract "NFT" --path "extensions/OtherFilename.sol" --address 0x12345...NFT
- verify contract in contracts-custom42/extensions/OtherFilename.sol:`shell`
npx hardhat --network beam verify-sourcify --contract "NFT" --full-path "contracts-custom42/extensions/OtherFilename.sol" --address 0x12345...
- sign up and get access token from npmjs
- add NPM_TOKEN to _Github actions_ secretsRELEASE_TOKEN
- create a Github access token and add it to the secrets as package.json
- bump the package version in `
- add annotated tag to branch:shell`
git tag -a v0.2.0 -m "release 0.2.0"`
- push all tagsshell`
git push --follow-tags
- install Node.js v16+
- install repo dependencies using npm i (_not_ yarn)package.json
- bump the package version in `
- buildshell`
npm run build`
- publish to npmshell``
NPM_TOKEN=yourNpmAccessToken npm publish --access public
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
- fork of zoey-t's hardhat-sourcify including prebuilt package and published latest version to npm