diff --git a/contracts/Token.sol b/contracts/Token.sol index c2ff85e..1917a9d 100644 --- a/contracts/Token.sol +++ b/contracts/Token.sol @@ -2,12 +2,11 @@ // Solidity files have to start with this pragma. // It will be used by the Solidity compiler to validate its version. -pragma solidity ^0.7.0; +pragma solidity ^0.8.0; // We import this library to be able to use console.log import "hardhat/console.sol"; - // This is the main building block for smart contracts. contract Token { // Some string type variables to identify the token. diff --git a/hardhat.config.js b/hardhat.config.js index be0181c..4b07621 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -6,5 +6,42 @@ require("@nomiclabs/hardhat-waffle"); require("./tasks/faucet"); module.exports = { - solidity: "0.7.3" + // solidity: "0.7.3", + solidity: "0.8.0", + networks: { + hardhat: { + chainId: 1337, // default: 31337 - metamask chain id issue - https://hardhat.org/metamask-issue.html + }, + localhost: { + url: "http://localhost:8545", + chainId: 1337, + }, + }, + rinkeby: { + chainId: 4, + url: process.env.ALCHEMY_RINKEBY_RPC_URL, + accounts: [process.env.RINKEBY_PRIVATE_KEY], + }, + kovan: { + chainId: 42, + url: process.env.ALCHEMY_KOVAN_RPC_URL, + accounts: [process.env.KOVAN_PRIVATE_KEY], + saveDeployments: true, + }, + mumbai: { + // polygon testnet + chainId: 80001, + url: process.env.ALCHEMY_MUMBAI_RPC_URL, + accounts: [process.env.MUMBAI_PRIVATE_KEY], + }, + polygon: { + chainId: 137, + url: process.env.ALCHEMY_POLYGON_RPC_URL, + accounts: [process.env.POLYGON_PRIVATE_KEY], + }, + ethereum: { + chainId: 1, + url: process.env.ALCHEMY_RINKEBY_RPC_URL, + accounts: [process.env.RINKEBY_PRIVATE_KEY], + }, };