@vechain/contract-verify
v0.0.4
Published
A tool to verify VeChain contracts on hardhat project.
Maintainers
Keywords
Readme
VeChain Contract Verify
A tool to verify VeChain contracts on hardhat project.
Prerequisites
These libraries are required to be installed in the hardhat project:
- Hardhat project
- @vechain/sdk-hardhat-plugin
Environment Variables
The following variables are required to be set in the environment variables:
- HARDHAT_NETWORK
Hardhat Config
For typescript users, you need to add the following type extension to the hardhat.config.ts file:
import "@vechain/contract-verify";The following config is required to be added to the hardhat.config.ts file:
verify: {
[contractName: string]: {
addressKey: string;
proxyName?: string;
};
}This package is intended to use the config package used in our hardhat projects. The addressKey is the key used in the config package to get the contract address. The proxyName is the name of the proxy contract. If not provided, the contract name will be used.
Installation
npm install @vechain/contract-verify
# or
yarn add @vechain/contract-verifyUsage
contract-verify --helpCommands
All the commands require a config file to be passed. The config file is a JSON file that contains the contract addresses and names. The package will compare the addresses and names in the package to discover the name of the contract and the proxy name.
check
Check the verification status of all contracts in the hardhat project.
contract-verify check --config <config>
# or
HARDHAT_NETWORK=vechain_testnet contract-verify check --config <config>single
Verify a single contract.
contract-verify single --address <address> --name <name>
# or
HARDHAT_NETWORK=vechain_testnet contract-verify single --address <address> --name <name>all
Verify all contracts in the hardhat project. including proxies, implementations and libraries.
contract-verify all --config <config>
# or
HARDHAT_NETWORK=vechain_testnet contract-verify all --config <config>