-
Notifications
You must be signed in to change notification settings - Fork 105
/
Makefile
57 lines (42 loc) · 2.05 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
watchtest:
echo "Run tsc-watch in another tab"
nodemon --verbose --ext js,ts,sol --exec "truffle test --network test"
# Note, if you want to run a specific test, you have to tell truffle to run the *transpiled* file, not the .ts file, like this:
# nodemon --verbose --ext js,ts,sol --exec "truffle test transpiled/test/ts/LicenseInventory.test.js --network test"
docker-solc-version:
docker run ethereum/solc:stable solc --version
build-abi:
docker run -v "$$PWD/contracts":/contracts ethereum/solc:stable --combined-json abi,devdoc,userdoc --pretty-json /contracts/LicenseCore.sol /contracts/Affiliate/AffiliateProgram.sol > ../dot-license-cli/lib/dot-license.abi.json
gas-estimates:
docker run -v "$$PWD/contracts":/contracts ethereum/solc:stable --gas /contracts/LicenseCore.sol /contracts/Affiliate/AffiliateProgram.sol > doc/gas-estimates.txt
asm:
docker run -v "$$PWD/contracts":/contracts ethereum/solc:stable --asm /contracts/LicenseCore.sol > LicenseCore.asm
compile:
npm run compile
transpile:
npm run transpile
# note: use --reset if you want to start migrate from the beginning
migrate-ropsten: compile transpile
NODE_ENV=ropsten truffle migrate --network ropsten
migrate-rinkeby: compile transpile
NODE_ENV=rinkeby truffle migrate --network rinkeby
migrate-geth: compile transpile
truffle migrate --network geth
remixd:
remixd -s contracts/
# To submit your code to Etherscsan:
# * make flatten_source
# * cat LicenseCore.etherscan.sol | pbcopy
# * Visit their **beta** that supports the Runs (Optimizer)
# * Contract Name should **not** have .sol at the end
# * Compiler is: cat build/contracts/LicenseCore.json | jq -r '.compiler.version'
flatten_source:
mkdir -p tmp
source $$HOME/anaconda/bin/activate py35 && cd contracts && solidity_flattener LicenseCore.sol > ../tmp/LicenseCore.etherscan.sol
compiler-version:
cat build/contracts/LicenseCore.json | jq -r '.compiler.version'
deployed-addresses:
cat build/contracts/LicenseCore.json | jq -r '.networks'
cat build/contracts/AffiliateProgram.json | jq -r '.networks'
networks:
truffle networks