-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy pathMakefile
91 lines (64 loc) · 3.8 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
.PHONY: build test anvil anvil-test anvil-deploy cast-call cast-send clean
FOUNDRY := docker run --rm foundry
ANVIL := docker run -d -p 8545:8545 --name anvil --rm foundry
build:
docker build --no-cache -f Dockerfile -t foundry .
test:
@${FOUNDRY} "forge test -vv"
simulate-deploy:
forge script scripts/v1/deploy.s.sol:DeployScript --rpc-url ${RPC_URL} --sender ${SENDER}
deploy:
forge script scripts/v1/deploy.s.sol:DeployScript --rpc-url ${RPC_URL} --sender ${SENDER} --broadcast
simulate-deploy-implementations-v2:
forge script scripts/v2/DeployImplementationsV2.s.sol:DeployImplementationsV2Script --rpc-url ${RPC_URL} --sender ${SENDER}
deploy-implementations-v2:
forge script scripts/v2/DeployImplementationsV2.s.sol:DeployImplementationsV2Script --rpc-url ${RPC_URL} --sender ${SENDER} --broadcast
simulate-deploy-create2-factory:
forge script scripts/DeployCreate2Factory.s.sol:DeployCreate2FactoryScript --rpc-url ${RPC_URL} --sender ${SENDER}
deploy-create2-factory:
forge script scripts/DeployCreate2Factory.s.sol:DeployCreate2FactoryScript --rpc-url ${RPC_URL} --sender ${SENDER} --broadcast
simulate-deploy-proxies-v2:
forge script scripts/v2/DeployProxiesV2.s.sol:DeployProxiesV2Script --rpc-url ${RPC_URL} --sender ${SENDER}
deploy-proxies-v2:
forge script scripts/v2/DeployProxiesV2.s.sol:DeployProxiesV2Script --rpc-url ${RPC_URL} --sender ${SENDER} --broadcast
simulate-setup-remote-resources-v2:
forge script scripts/v2/SetupRemoteResourcesV2.s.sol:SetupRemoteResourcesV2Script --rpc-url ${RPC_URL} --sender ${SENDER}
setup-remote-resources-v2:
forge script scripts/v2/SetupRemoteResourcesV2.s.sol:SetupRemoteResourcesV2Script --rpc-url ${RPC_URL} --sender ${SENDER} --broadcast
simulate-rotate-keys-v2:
forge script scripts/v2/RotateKeysV2.s.sol:RotateKeysV2Script --rpc-url ${RPC_URL} --sender ${SENDER}
rotate-keys-v2:
forge script scripts/v2/RotateKeysV2.s.sol:RotateKeysV2Script --rpc-url ${RPC_URL} --sender ${SENDER} --broadcast
simulate-deploy-address-utils-external:
forge script scripts/v2/DeployAddressUtilsExternal.s.sol:DeployAddressUtilsExternalScript --rpc-url ${RPC_URL} --sender ${SENDER}
deploy-address-utils-external:
forge script scripts/v2/DeployAddressUtilsExternal.s.sol:DeployAddressUtilsExternalScript --rpc-url ${RPC_URL} --sender ${SENDER} --broadcast
anvil:
docker rm -f anvil || true
@${ANVIL} "anvil --host 0.0.0.0 -a 13 --code-size-limit 250000"
anvil-test: anvil
pip3 install -r requirements.txt
python anvil/crosschainTransferIT.py
anvil-test-v2: anvil
pip3 install -r requirements.txt
python anvil/crosschainTransferITV2.py
deploy-local:
@docker exec anvil forge script anvil/scripts/${contract}.s.sol:${contract}Script --rpc-url http://localhost:8545 --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --broadcast
cast-call:
@docker exec anvil cast call ${contract_address} "${function}" --rpc-url http://localhost:8545
cast-send:
@docker exec anvil cast send ${contract_address} "${function}" --rpc-url http://localhost:8545 --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
clean:
@${FOUNDRY} "forge clean"
analyze-message-transmitter:
pip3 install mythril==0.24.8
myth -v4 analyze src/MessageTransmitter.sol --solc-json mythril.config.json --solv 0.7.6
analyze-message-transmitter-v2:
pip3 install mythril==0.24.8
myth -v4 analyze src/v2/MessageTransmitterV2.sol --solc-json mythril.config.json --solv 0.7.6
analyze-token-messenger-minter:
pip3 install mythril==0.24.8
myth -v4 analyze src/TokenMessenger.sol --solc-json mythril.config.json --solv 0.7.6
myth -v4 analyze src/TokenMinter.sol --solc-json mythril.config.json --solv 0.7.6
myth -v4 analyze src/v2/TokenMessengerV2.sol --solc-json mythril.config.json --solv 0.7.6
myth -v4 analyze src/v2/TokenMinterV2.sol --solc-json mythril.config.json --solv 0.7.6