From 3bb72f27f1f80e33e0393f29143a56e5c84120bc Mon Sep 17 00:00:00 2001 From: Adrian Delgado Date: Sun, 20 Feb 2022 23:39:36 -0800 Subject: [PATCH] Added Etherscan & fixed breaking styles --- backend/.example.env | 5 +++++ frontend/.example.env | 4 ++++ frontend/styles/globals.css | 20 ++++++++++---------- hardhat/.example.env | 10 ++++++++++ hardhat/hardhat.config.ts | 4 +++- hardhat/package.json | 2 ++ hardhat/yarn.lock | 35 +++++++++++++++++++++++++++++++++-- package.json | 2 +- 8 files changed, 68 insertions(+), 14 deletions(-) create mode 100644 backend/.example.env create mode 100644 frontend/.example.env create mode 100644 hardhat/.example.env diff --git a/backend/.example.env b/backend/.example.env new file mode 100644 index 0000000..03df9f5 --- /dev/null +++ b/backend/.example.env @@ -0,0 +1,5 @@ +PORT=5000 +MONGO_PASS= +INFURA_API_KEY= +PRIVATE_KEY= +JWT_SECRET= \ No newline at end of file diff --git a/frontend/.example.env b/frontend/.example.env new file mode 100644 index 0000000..64cf7c7 --- /dev/null +++ b/frontend/.example.env @@ -0,0 +1,4 @@ +NEXT_PUBLIC_PINATA_API_KEY= +NEXT_PUBLIC_PINATA_SECRET_KEY= +NEXT_PUBLIC_PINATA_JWT= +NEXT_PUBLIC_INFURA_KEY= \ No newline at end of file diff --git a/frontend/styles/globals.css b/frontend/styles/globals.css index 6ee9580..2c4b461 100644 --- a/frontend/styles/globals.css +++ b/frontend/styles/globals.css @@ -1,7 +1,7 @@ +@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap'); @tailwind base; @tailwind components; @tailwind utilities; -@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap"); * { box-sizing: border-box; @@ -10,7 +10,7 @@ } body { - font-family: "Roboto", sans-serif; + font-family: 'Roboto', sans-serif; /* height: 100%; */ @apply bg-gray-50 dark:bg-gray-800 dark:text-indigo-50; } @@ -31,7 +31,7 @@ header { animation: fadeInDown 1.5s; } -main { +500 { animation: fadeInUp 1.5s; } @@ -73,12 +73,12 @@ footer { } .nav-item { - @apply text-green-main hover:text-green-800 px-2 list-none - font-medium text-lg dark:text-green-bp2 dark:hover:text-yellow-400; + @apply text-green-500 hover:text-green-800 px-2 list-none + font-medium text-lg dark:text-green-600 dark:hover:text-yellow-400; } .active-nav { - @apply border-b-2 border-green-300 text-green-main list-none + @apply border-b-2 border-green-300 text-green-500 list-none hover:text-green-800 hover:border-green-800 px-2 font-medium text-lg dark:text-yellow-400 dark:hover:text-yellow-500 dark:border-yellow-400 dark:hover:border-yellow-500; @@ -146,13 +146,13 @@ footer { .green-btn { @apply text-white font-bold py-2 px-5 - rounded-3xl bg-green-main hover:bg-green-bp3 + rounded-3xl bg-green-500 hover:bg-green-300 shadow dark:shadow-2xl; } .metamask-btn { @apply text-white font-bold py-2 px-6 - rounded-3xl bg-green-main hover:bg-green-bp3 + rounded-3xl bg-green-500 hover:bg-green-300 shadow dark:shadow-2xl; } @@ -167,7 +167,7 @@ footer { } .disabled-green-btn { - @apply bg-green-main text-white font-bold py-2 px-4 + @apply bg-green-500 text-white font-bold py-2 px-4 rounded-3xl opacity-50 cursor-not-allowed shadow dark:shadow-2xl; } @@ -181,7 +181,7 @@ text-gray-900 hover:bg-gray-100 hover:text-blue-700 focus:z-10 .selected-btn-group { @apply border-gray-200 text-sm font-medium px-10 py-3 hover:bg-green-500 hover:text-white focus:z-10 - focus:ring-2 focus:ring-yellow-200 w-max bg-green-bp1 text-white + focus:ring-2 focus:ring-yellow-200 w-max bg-green-400 text-white dark:bg-green-700 dark:border-gray-600 dark:text-slate-100 dark:hover:bg-green-600; } diff --git a/hardhat/.example.env b/hardhat/.example.env new file mode 100644 index 0000000..ef9a90a --- /dev/null +++ b/hardhat/.example.env @@ -0,0 +1,10 @@ +# Hardhat's test wallet or whatever personal account you want to use: +MNEMONIC=test test test test test test test test test test test junk + +COINMARKETCAP_API_KEY= +REPORT_GAS= +INFURA_API_KEY=addkeyhere +ETHERSCAN_KEY=key + +# This is the private key for Hardhat's Account 0: +PRIVATE_KEY=ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 diff --git a/hardhat/hardhat.config.ts b/hardhat/hardhat.config.ts index eb9c630..069e4fd 100644 --- a/hardhat/hardhat.config.ts +++ b/hardhat/hardhat.config.ts @@ -3,6 +3,8 @@ */ import { task } from 'hardhat/config'; import 'dotenv/config'; +import '@openzeppelin/hardhat-upgrades'; +import '@nomiclabs/hardhat-etherscan'; import '@nomiclabs/hardhat-ethers'; import '@nomiclabs/hardhat-waffle'; import '@nomiclabs/hardhat-solhint'; @@ -11,7 +13,6 @@ import '@typechain/ethers-v5'; import 'hardhat-gas-reporter'; import 'hardhat-contract-sizer'; import 'solidity-coverage'; -import '@openzeppelin/hardhat-upgrades'; // This is a sample Hardhat task. To learn how to create your own go to // https://hardhat.org/guides/create-task.html @@ -44,6 +45,7 @@ module.exports = { runOnCompile: true, disambiguatePaths: false }, + etherscan: { apiKey: process.env.ETHERSCAN_KEY }, networks: { // hardhat: { // forking: { diff --git a/hardhat/package.json b/hardhat/package.json index c21a2be..38b5196 100644 --- a/hardhat/package.json +++ b/hardhat/package.json @@ -8,9 +8,11 @@ }, "devDependencies": { "@nomiclabs/hardhat-ethers": "^2.0.2", + "@nomiclabs/hardhat-etherscan": "^3.0.1", "@nomiclabs/hardhat-solhint": "^2.0.0", "@nomiclabs/hardhat-waffle": "^2.0.1", "@openzeppelin/contracts": "^4.4.2", + "@openzeppelin/contracts-upgradeable": "^4.5.1", "@openzeppelin/contracts6": "npm:@openzeppelin/contracts@^3.4.0", "@openzeppelin/hardhat-upgrades": "^1.10.0", "@typechain/ethers-v5": "^9.0.0", diff --git a/hardhat/yarn.lock b/hardhat/yarn.lock index 4959bac..0286c02 100644 --- a/hardhat/yarn.lock +++ b/hardhat/yarn.lock @@ -242,7 +242,7 @@ "@ethersproject/logger" "^5.5.0" "@ethersproject/properties" "^5.5.0" -"@ethersproject/address@5.5.0", "@ethersproject/address@>=5.0.0-beta.128", "@ethersproject/address@^5.0.4", "@ethersproject/address@^5.5.0": +"@ethersproject/address@5.5.0", "@ethersproject/address@>=5.0.0-beta.128", "@ethersproject/address@^5.0.2", "@ethersproject/address@^5.0.4", "@ethersproject/address@^5.5.0": version "5.5.0" resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.5.0.tgz#bcc6f576a553f21f3dd7ba17248f81b473c9c78f" integrity sha512-l4Nj0eWlTUh6ro5IbPTgbpT4wRbdH5l8CQf7icF7sb/SI3Nhd9Y9HzhonTSTi6CefI0necIw7LJqQPopPLZyWw== @@ -569,6 +569,19 @@ resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.0.4.tgz#288889c338acaf47cabd29020e561d0077b7efcf" integrity sha512-7LMR344TkdCYkMVF9LuC9VU2NBIi84akQiwqm7OufpWaDgHbWhuanY53rk3SVAW0E4HBk5xn5wl5+bN5f+Mq5w== +"@nomiclabs/hardhat-etherscan@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.0.1.tgz#25013e464451e75273736eada6473d98be56c283" + integrity sha512-ZeDMqUvbmWGSpsCkyD7QOsJ3lytNgmoOPpglOtgCfoIewb1o2Nz1PgofWYsSdIiWBtIN9rBF8ldU2jVpgsNhHg== + dependencies: + "@ethersproject/abi" "^5.1.2" + "@ethersproject/address" "^5.0.2" + cbor "^5.0.2" + debug "^4.1.1" + fs-extra "^7.0.1" + node-fetch "^2.6.0" + semver "^6.3.0" + "@nomiclabs/hardhat-solhint@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-solhint/-/hardhat-solhint-2.0.0.tgz#28f2c6b50709a91538ba69c1c8fe60985bf920f3" @@ -584,6 +597,11 @@ "@types/sinon-chai" "^3.2.3" "@types/web3" "1.0.19" +"@openzeppelin/contracts-upgradeable@^4.5.1": + version "4.5.1" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.5.1.tgz#dc354082460eb34f5833afdecfab46538b208c4f" + integrity sha512-xcKycsSyFauIGMhSeeTJW/Jzz9jZUJdiFNP9Wo/9VhMhw8t5X0M92RY6x176VfcIWsxURMHFWOJVTlFA78HI/w== + "@openzeppelin/contracts6@npm:@openzeppelin/contracts@^3.4.0": version "3.4.2" resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.4.2.tgz#d81f786fda2871d1eb8a8c5a73e455753ba53527" @@ -1973,7 +1991,7 @@ bech32@1.1.4: resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== -bignumber.js@^9.0.0: +bignumber.js@^9.0.0, bignumber.js@^9.0.1: version "9.0.2" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.2.tgz#71c6c6bed38de64e24a65ebe16cfcf23ae693673" integrity sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw== @@ -2318,6 +2336,14 @@ caseless@^0.12.0, caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= +cbor@^5.0.2: + version "5.2.0" + resolved "https://registry.yarnpkg.com/cbor/-/cbor-5.2.0.tgz#4cca67783ccd6de7b50ab4ed62636712f287a67c" + integrity sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A== + dependencies: + bignumber.js "^9.0.1" + nofilter "^1.0.4" + cbor@^8.0.0: version "8.1.0" resolved "https://registry.yarnpkg.com/cbor/-/cbor-8.1.0.tgz#cfc56437e770b73417a2ecbfc9caf6b771af60d5" @@ -6646,6 +6672,11 @@ node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.3.0.tgz#9f256b03e5826150be39c764bf51e993946d71a3" integrity sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q== +nofilter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-1.0.4.tgz#78d6f4b6a613e7ced8b015cec534625f7667006e" + integrity sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA== + nofilter@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-3.1.0.tgz#c757ba68801d41ff930ba2ec55bab52ca184aa66" diff --git a/package.json b/package.json index 9efceb0..08d8b36 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "create-ether-dapp", "description": "A template for building Full-Stack Blockchain Dapps using Next.js (React), TypeScript, Tailwind CSS, Hardhat, Solidity, and many more!", - "version": "1.1.63", + "version": "1.1.64", "author": "Adrian Delgado", "license": "MIT", "bin": "./bin/index.js",