import {task} from "hardhat/config";
task("deploy", "Deploy the contract", async (args, hre) => {
const helloHyperasChain = await hre.ethers.getContractFactory("helloHyperasChain");
const helloHyperasChainContract = await helloHyperasChain.deploy();
await helloHyperasChainContract.deployed();
console.log("helloHyperasChain deployed to:", helloHyperasChainContract.address);
})
import { HardhatUserConfig, task } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "./scripts/deploy"; // import script verify
const privateKey = '<ADD_YOUR_PRIVATE_KEY_HERE>'
const apiKeyEthereum = '<YOUR_API_KEY>' // you can get api key from etherscan.io or bscscan.com
const config: HardhatUserConfig = {
solidity: "0.8.9",
networks: {
hyperaschain_testnet: {
url: "https://vayne.hyperaschain.com/",
chainId: 140,
accounts: [privateKey]
}
}
};
export default config;
Run deploy contract:
Before deploy, you must sure your contracts already compile by run
npx hardhat <YOUR_TASK> --network <YOUR_NETWORK>
npx hardhat deploy --network hyperaschain_testnet // for testnet