Skip to content

Commit

Permalink
Merge branch 'main' of github.com:veeso-dev/erc20-template
Browse files Browse the repository at this point in the history
  • Loading branch information
veeso committed Jan 31, 2024
2 parents 1b95057 + 241bf95 commit ade3e8c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
1 change: 1 addition & 0 deletions .env.github
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ETHEREUM_API_URL=http://localhost/
GOERLI_API_URL=http://localhost/
SEPOLIA_API_URL=http://localhost/
PROD_PRIVATE_KEY="0000000000000000000000000000000000000000000000000000000000000000"
DEV_PRIVATE_KEY="0000000000000000000000000000000000000000000000000000000000000000"
LOCAL_PRIVATE_KEY="ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
Expand Down
4 changes: 3 additions & 1 deletion app/src/js/components/MetamaskConnect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export enum ChainId {
Goerli = '0x5',
Kovan = '0x2a',
Hardhat = '0x7a69',
Sepolia = '0xaa36a7',
}

const MetamaskConnect = () => {
Expand Down Expand Up @@ -83,7 +84,8 @@ const MetamaskConnect = () => {
</option>
)}
<option value={ChainId.Mainnet}>Mainnet</option>
<option value={ChainId.Goerli}>Goerli</option>
<option value={ChainId.Goerli}>Goerli</option>\
<option value={ChainId.Sepolia}>Sepolia</option>
<option value={ChainId.Hardhat}>Hardhat</option>
</Select>
<Button.Alternative
Expand Down
12 changes: 7 additions & 5 deletions app/src/js/web3/contracts/MyToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,14 +422,16 @@ interface ContractAddress {
[ChainId.Mainnet]: string;
[ChainId.Rinkeby]: string;
[ChainId.Ropsten]: string;
[ChainId.Sepolia]: string;
[ChainId.Hardhat]: string;
}

export const CONTRACT_ADDRESS: ContractAddress = {
[ChainId.Goerli]: '0x5FbDB2315678afecb367f032d93F642f64180aa3',
[ChainId.Kovan]: '0x5FbDB2315678afecb367f032d93F642f64180aa3',
[ChainId.Mainnet]: '0xa0647F0Da8B541C8876C234Bc9C4dC50F19515ea',
[ChainId.Rinkeby]: '0x5FbDB2315678afecb367f032d93F642f64180aa3',
[ChainId.Ropsten]: '0x5FbDB2315678afecb367f032d93F642f64180aa3',
[ChainId.Goerli]: '',
[ChainId.Kovan]: '',
[ChainId.Mainnet]: '',
[ChainId.Rinkeby]: '',
[ChainId.Ropsten]: '',
[ChainId.Sepolia]: '',
[ChainId.Hardhat]: '0x5FbDB2315678afecb367f032d93F642f64180aa3',
};
5 changes: 5 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ require("dotenv").config();

const {
ETHEREUM_API_URL,
SEPOLIA_API_URL,
GOERLI_API_URL,
DEV_PRIVATE_KEY,
PROD_PRIVATE_KEY,
Expand All @@ -23,6 +24,10 @@ const config: HardhatUserConfig = {
url: GOERLI_API_URL,
accounts: [`0x${DEV_PRIVATE_KEY}`],
},
sepolia: {
url: SEPOLIA_API_URL,
accounts: [`0x${DEV_PRIVATE_KEY}`],
},
localhost: {
url: "http://127.0.0.1:8545/",
accounts: [`0x${LOCAL_PRIVATE_KEY}`],
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "erc721-template",
"name": "erc20-template",
"scripts": {
"compile": "hardhat compile",
"test": "hardhat test",
"coverage": "hardhat coverage",
"typechain": "hardhat typechain",
"verify": "hardhat verify --network goerli",
"deploy:localhost": "hardhat run --network localhost scripts/deploy.ts",
"deploy:goerli": "hardhat run --network goerli scripts/deploy.ts",
"deploy:sepolia": "hardhat run --network sepolia scripts/deploy.ts",
"deploy:ethereum": "hardhat run --network ethereum scripts/deploy.ts"
},
"devDependencies": {
Expand Down

0 comments on commit ade3e8c

Please sign in to comment.