Skip to content

Commit 396b7f1

Browse files
committed
Merge branch 'feature/workspaces'
2 parents 3894f01 + abd2148 commit 396b7f1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1288
-1413
lines changed

.gitignore

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1 @@
1-
.DS_Store
21
node_modules
3-
/dist
4-
5-
/tests/e2e/videos/
6-
/tests/e2e/screenshots/
7-
8-
# local env files
9-
.env.local
10-
.env.*.local
11-
12-
# Log files
13-
npm-debug.log*
14-
yarn-debug.log*
15-
yarn-error.log*
16-
17-
# Editor directories and files
18-
.idea
19-
*.suo
20-
*.ntvs*
21-
*.njsproj
22-
*.sln
23-
*.sw?
24-
25-
# Build specific files
26-
build
27-
cache
28-
.openzeppelin/.session
29-
.openzeppelin/dev-*.json

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
"typescript",
1313
"typescriptreact"
1414
],
15-
"solidity.compileUsingRemoteVersion": "0.6.3+commit.8dda9521",
15+
"solidity.compileUsingRemoteVersion": "0.6.4+commit.1dca32f3",
1616
"solidity.packageDefaultDependenciesContractsDirectory": ""
1717
}

contracts/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.sol linguist-language=Solidity

contracts/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Build specific files
2+
.openzeppelin/.session
3+
.openzeppelin/dev-*.json
4+
build
5+
cache
6+
node_modules

.openzeppelin/project.json renamed to contracts/.openzeppelin/project.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"Counter": "Counter"
55
},
66
"dependencies": {},
7-
"name": "buidler-waffle-typechain-vue",
7+
"name": "@my-app/contracts",
88
"version": "0.1.0",
99
"compiler": {
1010
"compilerSettings": {
@@ -14,12 +14,12 @@
1414
}
1515
},
1616
"typechain": {
17-
"enabled": false,
18-
"outDir": "./build/types",
17+
"enabled": true,
18+
"outDir": "build/types",
1919
"target": "ethers"
2020
},
2121
"manager": "openzeppelin",
22-
"solcVersion": "0.6.3",
22+
"solcVersion": "0.6.4",
2323
"artifactsDir": "build/contracts",
2424
"contractsDir": "contracts"
2525
},

buidler.config.ts renamed to contracts/buidler.config.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ usePlugin("buidler-typechain");
55

66
const config: BuidlerConfig = {
77
paths: {
8-
artifacts: "./build/artifacts",
9-
tests: "./tests/contracts"
8+
artifacts: "build/contracts",
9+
tests: "tests"
1010
},
1111
solc: {
12-
version: "0.6.3"
12+
version: "0.6.4"
1313
},
1414
typechain: {
15-
outDir: "./build/types",
15+
outDir: "build/types",
1616
target: "ethers"
1717
}
1818
};
1919

20-
export default config;
20+
export default config;

contracts/Counter.sol renamed to contracts/contracts/Counter.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pragma solidity ^0.6.3;
1+
pragma solidity ^0.6.4;
22

33
import "@nomiclabs/buidler/console.sol";
44

File renamed without changes.

contracts/package.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "@my-app/contracts",
3+
"version": "0.1.0",
4+
"main": "index.js",
5+
"license": "MIT",
6+
"scripts": {
7+
"build": "oz compile",
8+
"node": "npx buidler node",
9+
"deploy:local": "yarn clean && yarn build && oz create Counter --skip-compile -n development --init",
10+
"upgrade:local": "yarn build && oz upgrade Counter --skip-compile -n development --init",
11+
"deploy:goerli": "yarn clean && yarn build && oz create Counter --skip-compile -n goerli --init",
12+
"upgrade:goerli": "yarn build && oz upgrade Counter --skip-compile -n goerli --init",
13+
"test": "buidler typechain && buidler test",
14+
"clean": "rm -rf cache && rm -rf build && rm -f .openzeppelin/.session && rm -f .openzeppelin/dev-*.json"
15+
},
16+
"devDependencies": {
17+
"@nomiclabs/buidler": "^1.2.0",
18+
"@nomiclabs/buidler-ethers": "^1.2.0",
19+
"@nomiclabs/buidler-truffle5": "^1.2.0",
20+
"@nomiclabs/buidler-waffle": "^1.2.0",
21+
"@nomiclabs/buidler-web3": "^1.2.0",
22+
"@openzeppelin/cli": "^2.7.2",
23+
"@types/chai": "^4.2.11",
24+
"@types/mocha": "^7.0.2",
25+
"@types/node": "^13.9.2",
26+
"@typescript-eslint/eslint-plugin": "^2.24.0",
27+
"@typescript-eslint/parser": "^2.24.0",
28+
"buidler-typechain": "^0.0.5",
29+
"chai": "^4.2.0",
30+
"ethereum-waffle": "^2.4.0",
31+
"ethers": "^4.0.46",
32+
"ts-generator": "^0.0.8",
33+
"ts-node": "^8.8.1",
34+
"typechain": "^1.0.5",
35+
"typechain-target-ethers": "^1.0.3",
36+
"typechain-target-truffle": "^1.0.2",
37+
"typechain-target-web3-v1": "^1.0.4",
38+
"typescript": "^3.8.3",
39+
"web3": "^1.2.6"
40+
}
41+
}

contracts/scripts/deploy.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { ethers } from "@nomiclabs/buidler";
2+
3+
async function main() {
4+
const factory = await ethers.getContract("Counter");
5+
6+
// If we had constructor arguments, they would be passed into deploy()
7+
const contract = await factory.deploy();
8+
9+
// The address that the Contract WILL have once mined
10+
console.log(contract.address);
11+
12+
// The transaction that was sent to the network to deploy the Contract
13+
console.log(contract.deployTransaction.hash);
14+
15+
// The contract is NOT deployed yet; we must wait until it is mined
16+
await contract.deployed();
17+
}
18+
19+
main()
20+
.then(() => process.exit(0))
21+
.catch(error => {
22+
console.error(error);
23+
process.exit(1);
24+
});

0 commit comments

Comments
 (0)