Skip to content

Commit

Permalink
deploy: sepolia using infura
Browse files Browse the repository at this point in the history
  • Loading branch information
Nasfame committed Sep 12, 2023
1 parent 9f88c91 commit db14155
Show file tree
Hide file tree
Showing 6 changed files with 203 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SEPOLIA_PRIVATE_KEY=
INFURA_PROJECT_ID=
11 changes: 11 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";

import dotenv from 'dotenv'

dotenv.config()

const config: HardhatUserConfig = {
solidity: "0.8.19",
networks: {
// Add your network configurations here
sepolia: {
url: `https://sepolia.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: [process.env.SEPOLIA_PRIVATE_KEY ?? ''],
},
},
};

export default config;
13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{
"name": "decenter-contracts",
"private": true,
"scripts": {
"clean": "hardhat clean",
"compile": "hardhat compile",
"sepolia": "hardhat run scripts/deploy.ts --network sepolia"
},
"devDependencies": {
"@nomicfoundation/hardhat-chai-matchers": "^2.0.0",
"@nomicfoundation/hardhat-ethers": "^3.0.0",
Expand All @@ -14,9 +21,13 @@
"ethers": "^6.4.0",
"hardhat": "^2.17.3",
"hardhat-gas-reporter": "^1.0.8",
"rimraf": "^5.0.1",
"solidity-coverage": "^0.8.0",
"ts-node": ">=8.0.0",
"typechain": "^8.1.0",
"typescript": ">=4.5.0"
},
"dependencies": {
"dotenv": "^16.3.1"
}
}
}
176 changes: 176 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions scripts/deploy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ethers } from "hardhat";
import {config} from 'dotenv'

async function main() {
const currentTimestampInSeconds = Math.round(Date.now() / 1000);
Expand Down
Loading

0 comments on commit db14155

Please sign in to comment.