@aaiello/arkive-hardhat

0.3.0 • Public • Published

Arkive smart contracts

Smart contracts built for Arkive

Instalation

npm install

VSCode

VSCode is not familiar with the solidity language, so solidity support needs to be installed.

code --install-extension JuanBlanco.solidity

Having done that you should proceed to install prettier-vscode.

code --install-extension esbenp.prettier-vscode

Test

Run test:

npx hardhat test

Run localhost

To run on localhost you should first start local node and then deploy to it

npx hardhat node
npx hardhat run scripts/deploy-dev.ts --network localhost

Run console

ex: get addr balance

npx hardhat console --network localhost
const value = await ethers.provider.getBalance("0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9")
value.toString()

Deploy

Deploy to any network is the same. After each deploy you can find the Json file with the Abi and address information. Be sure you set the right values on .env

npx hardhat run scripts/deploy-dev.ts --network ropsten

or

npx hardhat run scripts/deploy.ts --network mainnet

Verify on chain

Run this command with the address and the argument used when created

npx hardhat verify --network mainnet DEPLOYED_CONTRACT_ADDRESS "Constructor argument 1"

More info: https://hardhat.org/plugins/nomiclabs-hardhat-etherscan.html

npx hardhat verify --network mainnet 0xa7C098E26cbd9aAA515dF140d7020fB46a98be37 "Constructor argument 1" npx hardhat verify --network mainnet --constructor-args arguments.js 0xa7C098E26cbd9aAA515dF140d7020fB46a98be37

Readme

Keywords

none

Package Sidebar

Install

npm i @aaiello/arkive-hardhat

Weekly Downloads

3

Version

0.3.0

License

ISC

Unpacked Size

1.1 MB

Total Files

82

Last publish

Collaborators

  • aaiello