-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(workspaces)!: move frontend and contract dev to separate workspaces
BREAKING CHANGE: This is a total re-write from the ground up with some workflow changes and different package decisions - all for a much better developer experience.
- Loading branch information
1 parent
3894f01
commit abd2148
Showing
69 changed files
with
1,288 additions
and
1,413 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1 @@ | ||
.DS_Store | ||
node_modules | ||
/dist | ||
|
||
/tests/e2e/videos/ | ||
/tests/e2e/screenshots/ | ||
|
||
# local env files | ||
.env.local | ||
.env.*.local | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Editor directories and files | ||
.idea | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
# Build specific files | ||
build | ||
cache | ||
.openzeppelin/.session | ||
.openzeppelin/dev-*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.sol linguist-language=Solidity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Build specific files | ||
.openzeppelin/.session | ||
.openzeppelin/dev-*.json | ||
build | ||
cache | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
pragma solidity ^0.6.3; | ||
pragma solidity ^0.6.4; | ||
|
||
import "@nomiclabs/buidler/console.sol"; | ||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"name": "@my-app/contracts", | ||
"version": "0.1.0", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "oz compile", | ||
"node": "npx buidler node", | ||
"deploy:local": "yarn clean && yarn build && oz create Counter --skip-compile -n development --init", | ||
"upgrade:local": "yarn build && oz upgrade Counter --skip-compile -n development --init", | ||
"deploy:goerli": "yarn clean && yarn build && oz create Counter --skip-compile -n goerli --init", | ||
"upgrade:goerli": "yarn build && oz upgrade Counter --skip-compile -n goerli --init", | ||
"test": "buidler typechain && buidler test", | ||
"clean": "rm -rf cache && rm -rf build && rm -f .openzeppelin/.session && rm -f .openzeppelin/dev-*.json" | ||
}, | ||
"devDependencies": { | ||
"@nomiclabs/buidler": "^1.2.0", | ||
"@nomiclabs/buidler-ethers": "^1.2.0", | ||
"@nomiclabs/buidler-truffle5": "^1.2.0", | ||
"@nomiclabs/buidler-waffle": "^1.2.0", | ||
"@nomiclabs/buidler-web3": "^1.2.0", | ||
"@openzeppelin/cli": "^2.7.2", | ||
"@types/chai": "^4.2.11", | ||
"@types/mocha": "^7.0.2", | ||
"@types/node": "^13.9.2", | ||
"@typescript-eslint/eslint-plugin": "^2.24.0", | ||
"@typescript-eslint/parser": "^2.24.0", | ||
"buidler-typechain": "^0.0.5", | ||
"chai": "^4.2.0", | ||
"ethereum-waffle": "^2.4.0", | ||
"ethers": "^4.0.46", | ||
"ts-generator": "^0.0.8", | ||
"ts-node": "^8.8.1", | ||
"typechain": "^1.0.5", | ||
"typechain-target-ethers": "^1.0.3", | ||
"typechain-target-truffle": "^1.0.2", | ||
"typechain-target-web3-v1": "^1.0.4", | ||
"typescript": "^3.8.3", | ||
"web3": "^1.2.6" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { ethers } from "@nomiclabs/buidler"; | ||
|
||
async function main() { | ||
const factory = await ethers.getContract("Counter"); | ||
|
||
// If we had constructor arguments, they would be passed into deploy() | ||
const contract = await factory.deploy(); | ||
|
||
// The address that the Contract WILL have once mined | ||
console.log(contract.address); | ||
|
||
// The transaction that was sent to the network to deploy the Contract | ||
console.log(contract.deployTransaction.hash); | ||
|
||
// The contract is NOT deployed yet; we must wait until it is mined | ||
await contract.deployed(); | ||
} | ||
|
||
main() | ||
.then(() => process.exit(0)) | ||
.catch(error => { | ||
console.error(error); | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"module": "commonjs", | ||
"strict": true, | ||
"esModuleInterop": true, | ||
"outDir": "dist", | ||
"resolveJsonModule": true | ||
}, | ||
"include": ["./scripts", "./tests"], | ||
"files": [ | ||
"./buidler.config.ts", | ||
"./node_modules/@nomiclabs/buidler-ethers/src/type-extensions.d.ts", | ||
"./node_modules/@nomiclabs/buidler-waffle/src/type-extensions.d.ts", | ||
"./node_modules/buidler-typechain/src/type-extensions.d.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,89 +1,28 @@ | ||
{ | ||
"name": "buidler-waffle-typechain-vue", | ||
"version": "0.1.0", | ||
"name": "@my-app/monorepo", | ||
"private": true, | ||
"scripts": { | ||
"build": "yarn build:contracts && yarn build:web", | ||
"build:contracts": "oz compile && buidler typechain", | ||
"build:web": "vue-cli-service build", | ||
"clean": "rm -rf cache && rm -rf build && rm -f .openzeppelin/.session && rm -f .openzeppelin/dev-*.json", | ||
"deploy:local": "yarn clean && yarn build:contracts && oz create Counter --skip-compile -n development --init", | ||
"lint": "vue-cli-service lint", | ||
"start:dev": "yarn deploy:local && vue-cli-service serve", | ||
"start:node": "buidler node", | ||
"start:web": "vue-cli-service serve", | ||
"test": "yarn test:contracts && yarn test:unit && yarn test:e2e", | ||
"test:contracts": "buidler test", | ||
"test:e2e": "vue-cli-service test:e2e", | ||
"test:unit": "vue-cli-service test:unit", | ||
"upgrade:local": "yarn build:contracts && oz upgrade Counter --skip-compile -n development --init" | ||
}, | ||
"dependencies": { | ||
"@fortawesome/fontawesome-free": "^5.8.2", | ||
"@resolver-engine/core": "^0.3.3", | ||
"core-js": "^3.6.4", | ||
"ethers": "^4.0.45", | ||
"register-service-worker": "^1.6.2", | ||
"roboto-fontface": "*", | ||
"vue": "^2.6.11", | ||
"vue-class-component": "^7.2.2", | ||
"vue-property-decorator": "^8.3.0", | ||
"vue-router": "^3.1.5", | ||
"vuetify": "^2.2.11", | ||
"vuex": "^3.1.2" | ||
}, | ||
"devDependencies": { | ||
"@nomiclabs/buidler": "^1.2.0", | ||
"@nomiclabs/buidler-ethers": "^1.2.0", | ||
"@nomiclabs/buidler-waffle": "^1.2.0", | ||
"@openzeppelin/cli": "^2.7.1", | ||
"@types/chai": "^4.2.9", | ||
"@types/mocha": "^7.0.1", | ||
"@types/node": "^13.7.7", | ||
"@typescript-eslint/eslint-plugin": "^2.18.0", | ||
"@typescript-eslint/parser": "^2.18.0", | ||
"@vue/cli-plugin-babel": "~4.2.0", | ||
"@vue/cli-plugin-e2e-cypress": "~4.2.0", | ||
"@vue/cli-plugin-eslint": "~4.2.0", | ||
"@vue/cli-plugin-pwa": "~4.2.0", | ||
"@vue/cli-plugin-router": "~4.2.0", | ||
"@vue/cli-plugin-typescript": "~4.2.0", | ||
"@vue/cli-plugin-unit-mocha": "~4.2.0", | ||
"@vue/cli-plugin-vuex": "~4.2.0", | ||
"@vue/cli-service": "~4.2.0", | ||
"@vue/eslint-config-prettier": "^6.0.0", | ||
"@vue/eslint-config-typescript": "^5.0.1", | ||
"@vue/test-utils": "1.0.0-beta.31", | ||
"buidler-typechain": "^0.0.5", | ||
"chai": "^4.2.0", | ||
"eslint": "^6.7.2", | ||
"eslint-plugin-prettier": "^3.1.1", | ||
"eslint-plugin-vue": "^6.1.2", | ||
"ethereum-waffle": "^2.3.2", | ||
"lint-staged": "^9.5.0", | ||
"null-loader": "^3.0.0", | ||
"prettier": "^1.19.1", | ||
"sass": "^1.25.0", | ||
"sass-loader": "^8.0.2", | ||
"solc": "0.6.3", | ||
"ts-generator": "^0.0.8", | ||
"ts-node": "^8.6.2", | ||
"typechain": "^1.0.5", | ||
"typechain-target-ethers": "^1.0.3", | ||
"typechain-target-truffle": "^1.0.2", | ||
"typechain-target-web3-v1": "^1.0.4", | ||
"typescript": "^3.8.3", | ||
"vue-cli-plugin-vuetify": "~2.0.5", | ||
"vue-template-compiler": "^2.6.11", | ||
"vuetify-loader": "^1.3.0" | ||
}, | ||
"gitHooks": { | ||
"pre-commit": "lint-staged" | ||
}, | ||
"lint-staged": { | ||
"*.{js,jsx,vue,ts,tsx}": [ | ||
"vue-cli-service lint", | ||
"git add" | ||
"workspaces": { | ||
"packages": ["contracts", "vue-app"], | ||
"nohoist": [ | ||
"**/@nomiclabs/**", | ||
"**/typescript", | ||
"**/ts-node", | ||
"**/@vue/**", | ||
"**/@openzeppelin/cli" | ||
] | ||
}, | ||
"scripts": { | ||
"build": "yarn workspaces run build", | ||
"build:contracts": "yarn workspace @my-app/contracts run build", | ||
"build:web": "yarn workspace @my-app/vue-app run build", | ||
"start:dev": "yarn deploy:local && yarn start:web", | ||
"start:node": "yarn workspace @my-app/contracts run node", | ||
"start:web": "yarn workspace @my-app/vue-app run serve", | ||
"test": "yarn workspaces run test", | ||
"test:contracts": "yarn workspace @my-app/contracts run test", | ||
"test:web": "yarn workspace @my-app/vue-app run test", | ||
"deploy:local": "yarn workspace @my-app/contracts run deploy:local", | ||
"upgrade:local": "yarn workspace @my-app/contracts run upgrade:local", | ||
"lint:web": "yarn workspace @my-app/vue-app run lint" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.