Skip to content

Instantly share code, notes, and snippets.

@ImHukam
Created October 3, 2023 15:35
Show Gist options
  • Save ImHukam/57dd353514a4a09e3a0d3e0343faddcf to your computer and use it in GitHub Desktop.
Save ImHukam/57dd353514a4a09e3a0d3e0343faddcf to your computer and use it in GitHub Desktop.
Polygonscan contract verifications files
const hre = require("hardhat");
async function main() {
const Contract = await hre.ethers.getContractFactory("TokenTransfersLibrary");
const contract = await Contract.deploy();
await contract.deployed();
console.log("deployed to:", contract.address);
}
main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});
require("@nomiclabs/hardhat-waffle");
require('@nomiclabs/hardhat-ethers');
require('@nomiclabs/hardhat-etherscan');
const { mnemonic } = require('./secrets.json');
task("accounts", "Prints the list of accounts", async () => {
const accounts = await ethers.getSigners();
for (const account of accounts) {
console.log(account.address);
}
});
module.exports = {
defaultNetwork: "mumbai",
networks: {
localhost: {
url: "http://127.0.0.1:7545"
},
hardhat: {
},
mumbai: {
url: "https://rpc-mumbai.maticvigil.com",
chainId: 80001,
// gasPrice: 20000000000,
accounts: {mnemonic: mnemonic}
}
},
etherscan: {
apiKey:'< polygonscan api key>
},
solidity: {
version: "0.8.18",
settings: {
optimizer: {
enabled: true,
runs: 200
},
viaIR: true
}
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts"
},
mocha: {
timeout: 20000
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment