-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
64 lines (44 loc) · 2.41 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
.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/1_deploy.s.sol:DeployScript --rpc-url ${RPC_URL} --sender ${SENDER}
deploy:
forge script scripts/1_deploy.s.sol:DeployScript --rpc-url ${RPC_URL} --sender ${SENDER} --broadcast
simulate-setup-second-attester:
forge script scripts/2_setupSecondAttester.s.sol:SetupSecondAttesterScript --rpc-url ${RPC_URL} --sender ${SENDER}
setup-second-attester:
forge script scripts/2_setupSecondAttester.s.sol:SetupSecondAttesterScript --rpc-url ${RPC_URL} --sender ${SENDER} --broadcast
simulate-setup-remote-resources:
forge script scripts/3_setupRemoteResources.s.sol:SetupRemoteResourcesScript --rpc-url ${RPC_URL} --sender ${SENDER}
setup-remote-resources:
forge script scripts/3_setupRemoteResources.s.sol:SetupRemoteResourcesScript --rpc-url ${RPC_URL} --sender ${SENDER} --broadcast
simulate-rotate-keys:
forge script scripts/4_rotateKeys.s.sol:RotateKeysScript --rpc-url ${RPC_URL} --sender ${SENDER}
rotate-keys:
forge script scripts/4_rotateKeys.s.sol:RotateKeysScript --rpc-url ${RPC_URL} --sender ${SENDER} --broadcast
simulate-replace-remote-resources:
forge script scripts/5_replaceRemoteResources.s.sol:ReplaceRemoteResourcesScript --rpc-url ${RPC_URL} --sender ${SENDER}
replace-remote-resources:
forge script scripts/5_replaceRemoteResources.s.sol:ReplaceRemoteResourcesScript --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
python3 anvil/crosschainTransferIT.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:
pip3 install -r requirements.txt
slither .