@calibur/skr-template
Advanced tools
Comparing version 0.0.39-alpha.0 to 0.0.41-alpha.0
@@ -9,10 +9,10 @@ { | ||
"serve": "vite preview", | ||
"deploy": "npm run test && npm run compile && hardhat deploy:Token --name 'NFT'", | ||
"deploy": "npm run test && npm run compile && hardhat deploy:Token --name 'NFT' --network 'localhost'", | ||
"test": "npm run typechain && npm run test:unit && npm run test:coverage", | ||
"test:unit": "hardhat test", | ||
"test:coverage": "cross-env CODE_COVERAGE=true hardhat coverage --solcoverjs ./.solcover.js --temp artifacts --testfiles \"./test/**/*.ts\"", | ||
"lint": "npm run lint:sol && npm run lint:ts && npm run prettier", | ||
"lint": "npm run lint:vue && npm run lint:sol && npm run prettier", | ||
"lint:vue": "eslint --ext js,jsx,ts,tsx,vue . --fix", | ||
"lint:sol": "solhint --config ./.solhint.json --max-warnings 0 \"contracts/**/*.sol\"", | ||
"lint:ts": "eslint --config ./.eslintrc.js --ignore-path ./.eslintignore --ext .js,.ts .", | ||
"prettier": "prettier --config ./.prettierrc --write \"**/*.{js,json,md,sol,ts}\"", | ||
"prettier": "prettier --config ./.prettierrc --write \"**/*.{js,json,md,sol}\"", | ||
"clean": "shx rm -rf ./artifacts ./cache ./coverage ./coverage.json", | ||
@@ -28,3 +28,2 @@ "typechain": "cross-env TS_NODE_TRANSPILE_ONLY=true hardhat typechain", | ||
"@nomiclabs/hardhat-waffle": "<%= @nomiclabs/hardhat-waffle %>", | ||
"@rollup/plugin-strip": "<%= @rollup/plugin-strip %>", | ||
"@typechain/ethers-v5": "<%= @typechain/ethers-v5 %>", | ||
@@ -38,7 +37,12 @@ "@typechain/hardhat": "<%= @typechain/hardhat %>", | ||
"@vitejs/plugin-vue": "<%= @vitejs/plugin-vue %>", | ||
"@vue/eslint-config-prettier": "<%= @vue/eslint-config-prettier %>", | ||
"@vue/eslint-config-typescript": "<%= @vue/eslint-config-typescript %>", | ||
"autoprefixer": "<%= autoprefixer %>", | ||
"chai": "<%= chai %>", | ||
"cross-env": "<%= cross-env %>", | ||
"dotenv": "<%= dotenv %>", | ||
"eslint": "7.32.0", | ||
"eslint": "<%= eslint %>", | ||
"eslint-config-prettier": "<%= eslint-config-prettier %>", | ||
"eslint-plugin-prettier": "<%= eslint-plugin-prettier %>", | ||
"eslint-plugin-vue": "<%= eslint-plugin-vue %>", | ||
"ethereum-waffle": "<%= ethereum-waffle %>", | ||
@@ -48,2 +52,3 @@ "ethers": "<%= ethers %>", | ||
"hardhat-gas-reporter": "<%= hardhat-gas-reporter %>", | ||
"postcss": "<%= postcss %>", | ||
"prettier": "<%= prettier %>", | ||
@@ -56,15 +61,16 @@ "prettier-plugin-solidity": "<%= prettier-plugin-solidity %>", | ||
"solidity-coverage": "<%= solidity-coverage %>", | ||
"tailwindcss": "<%= tailwindcss %>", | ||
"ts-node": "<%= ts-node %>", | ||
"typechain": "<%= typechain %>", | ||
"typescript": "<%= typescript %>", | ||
"unplugin-vue-components": "<%= unplugin-vue-components %>", | ||
"vite": "<%= vite %>", | ||
"unplugin-vue-components": "<%= unplugin-vue-components %>", | ||
"vite-plugin-host": "<%= vite-plugin-host %>", | ||
"vite-plugin-style-import": "<%= vite-plugin-style-import %>", | ||
"vue-tsc": "<%= vue-tsc %>" | ||
}, | ||
"dependencies": { | ||
"daisyui": "<%= daisyui %>", | ||
"normalize.css": "<%= normalize.css %>", | ||
"vue": "<%= vue@next %>" | ||
} | ||
} | ||
} |
@@ -1,1 +0,39 @@ | ||
# vue3-hardhat-dapp | ||
# hardhat-vue3-dapp | ||
This repository contains a sample project that you can use as the starting point for your Ethereum project. It's also a great fit for learning the basics of smart contract development. | ||
This project is intended to be used with the [Hardhat Beginners Tutorial](https://hardhat.org/tutorial/), but you should be able to follow it by yourself by reading the README and exploring its contracts, tests, scripts and frontend directories. | ||
## Quick start | ||
The first things you need to do are cloning this repository and installing its dependencies: | ||
```sh | ||
skr create <project-name> --template hardhat-vue3-dapp | ||
cd <project-name> | ||
npm install | ||
``` | ||
Once installed, let's run Hardhat's testing network: | ||
```sh | ||
npx hardhat node | ||
``` | ||
Then, on a new terminal, go to the repository's root folder and run this to deploy your contract: | ||
```sh | ||
npm run deploy | ||
``` | ||
Finally, we can run the frontend with: | ||
```sh | ||
npm run dev | ||
``` | ||
Open http://localhost:3000/ to see your Dapp. You will need to have [Metamask](https://metamask.io/) installed and listening to localhost 8545. | ||
## Troubleshooting | ||
- `Invalid nonce` errors: if you are seeing this error on the `npx hardhat node` console, try resetting your Metamask account. This will reset the account's transaction history and also the nonce. Open Metamask, click on your account followed by `Settings > Advanced > Reset Account`. |
@@ -11,5 +11,16 @@ import fs from 'fs' | ||
async (TaskArguments, { artifacts, config, ethers, network, run }) => { | ||
// This is just a convenience check | ||
if (network.name === 'hardhat') { | ||
console.warn( | ||
'You are trying to deploy a contract to the Hardhat Network, which' + | ||
'gets automatically created and destroyed every time. Use the Hardhat' + | ||
" option '--network localhost'" | ||
) | ||
} | ||
const [deployer] = await ethers.getSigners() | ||
console.log('Deploying contracts with the account:', deployer.address) | ||
console.log( | ||
'Deploying contracts with the account:', | ||
await deployer.getAddress() | ||
) | ||
console.log('Account balance:', (await deployer.getBalance()).toString()) | ||
@@ -16,0 +27,0 @@ const Token: Token__factory = await ethers.getContractFactory('Token') |
import './deploy' | ||
import './faucet' |
@@ -23,3 +23,3 @@ { | ||
], | ||
"files": ["./hardhat.config.ts"] | ||
"files": ["_hardhat.config.ts"] | ||
} |
import { defineConfig } from 'vite' | ||
import vue from '@vitejs/plugin-vue' | ||
import host from 'vite-plugin-host' | ||
import strip from '@rollup/plugin-strip' | ||
import components from 'unplugin-vue-components/vite' | ||
import styleImport from 'vite-plugin-style-import' | ||
const isProd = process.env.NODE_ENV === 'production' | ||
const plugins = [ | ||
vue(), | ||
host(), | ||
components(), | ||
styleImport({ | ||
libs: [] | ||
components({ | ||
dirs: 'frontend/components' | ||
}) | ||
] | ||
if (isProd) { | ||
plugins.push(strip()) | ||
} | ||
export default defineConfig({ | ||
@@ -27,4 +18,5 @@ root: './frontend', | ||
server: { | ||
port: parseInt(process.env.PORT || '3000') | ||
port: parseInt(process.env.PORT || '3000'), | ||
open: true | ||
} | ||
}) |
{ | ||
"name": "@calibur/skr-template", | ||
"version": "0.0.39-alpha.0", | ||
"version": "0.0.41-alpha.0", | ||
"author": "falstack <icesilt@outlook.com>", | ||
"license": "MIT", | ||
"gitHead": "6bab34286331a87b59451c34378f82962e075c57" | ||
"license": "MIT" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62094
69
781