@@ -27,18 +27,20 @@ deploy-anvil:
27
27
@forge create ./src/Counter.sol:Counter --rpc-url anvil --interactive | tee deployment-anvil.txt
28
28
29
29
deploy :
30
- @eval $$(curl -H "x-auth-token: $${BPT_SERVICE_TOKEN}" -s $${BTP_CLUSTER_MANAGER_URL}/ide/foundry/$${BTP_SCS_ID}/env | sed 's/^/export /' )
31
- @if [ -z " ${ETH_FROM} " ]; then \
32
- if [ -z " ${BTP_GAS_PRICE} " ]; then \
33
- forge create ./src/Counter.sol:Counter ${EXTRA_ARGS} --rpc-url ${BTP_RPC_URL} --interactive | tee deployment.txt; \
30
+ @eval $$(curl -H "x-auth-token: $${BTP_SERVICE_TOKEN}" -s $${BTP_CLUSTER_MANAGER_URL}/ide/foundry/$${BTP_SCS_ID}/env | sed 's/^/export /' ) ; \
31
+ if [ -z " $$ {BTP_FROM}" ]; then \
32
+ echo " \033[1;33mWARNING: No keys are activated on the node, falling back to interactive mode...\033[0m" ; \
33
+ echo " " ; \
34
+ if [ -z " $$ {BTP_GAS_PRICE}" ]; then \
35
+ forge create ./src/Counter.sol:Counter $$ {EXTRA_ARGS} --rpc-url $$ {BTP_RPC_URL} --interactive | tee deployment.txt; \
34
36
else \
35
- forge create ./src/Counter.sol:Counter ${EXTRA_ARGS} --rpc-url ${BTP_RPC_URL} --interactive --gas-price ${BTP_GAS_PRICE} | tee deployment.txt; \
37
+ forge create ./src/Counter.sol:Counter $$ {EXTRA_ARGS} --rpc-url $$ {BTP_RPC_URL} --interactive --gas-price $ $ {BTP_GAS_PRICE} | tee deployment.txt; \
36
38
fi ; \
37
39
else \
38
- if [ -z " ${BTP_GAS_PRICE} " ]; then \
39
- forge create ./src/Counter.sol:Counter ${EXTRA_ARGS} --rpc-url ${BTP_RPC_URL} --unlocked | tee deployment.txt; \
40
+ if [ -z " $$ {BTP_GAS_PRICE}" ]; then \
41
+ forge create ./src/Counter.sol:Counter $$ {EXTRA_ARGS} --rpc-url $$ {BTP_RPC_URL} --unlocked --from $$ {BTP_FROM} | tee deployment.txt; \
40
42
else \
41
- forge create ./src/Counter.sol:Counter ${EXTRA_ARGS} --rpc-url ${BTP_RPC_URL} --unlocked --gas-price ${BTP_GAS_PRICE} | tee deployment.txt; \
43
+ forge create ./src/Counter.sol:Counter $$ {EXTRA_ARGS} --rpc-url $$ {BTP_RPC_URL} --unlocked --from $$ {BTP_FROM} -- gas-price $ $ {BTP_GAS_PRICE} | tee deployment.txt; \
42
44
fi ; \
43
45
fi
44
46
@@ -54,13 +56,13 @@ script:
54
56
echo " \033[1;31mERROR: Contract was not deployed or the deployment-anvil.txt went missing.\033[0m" ; \
55
57
exit 1; \
56
58
fi
57
- @eval $$(curl -H "x-auth-token: $${BPT_SERVICE_TOKEN }" -s $${BTP_CLUSTER_MANAGER_URL}/ide/foundry/$${BTP_SCS_ID}/env | sed 's/^/export /' )
58
- @ if [ -z " ${ETH_FROM } " ]; then \
59
+ @eval $$(curl -H "x-auth-token: $${BTP_SERVICE_TOKEN }" -s $${BTP_CLUSTER_MANAGER_URL}/ide/foundry/$${BTP_SCS_ID}/env | sed 's/^/export /' ) ; \
60
+ if [ -z " ${BTP_FROM } " ]; then \
59
61
echo " \033[1;33mWARNING: No keys are activated on the node, falling back to interactive mode...\033[0m" ; \
60
62
echo " " ; \
61
63
@DEPLOYED_ADDRESS=$$(grep "Deployed to:" deployment.txt | awk '{print $$3}' ) forge script script/Counter.s.sol:CounterScript ${EXTRA_ARGS} --rpc-url ${BTP_RPC_URL} -i=1; \
62
64
else \
63
- @DEPLOYED_ADDRESS=$$(grep "Deployed to:" deployment.txt | awk '{print $$3}' ) forge script script/Counter.s.sol:CounterScript ${EXTRA_ARGS} --rpc-url ${BTP_RPC_URL} --unlocked; \
65
+ @DEPLOYED_ADDRESS=$$(grep "Deployed to:" deployment.txt | awk '{print $$3}' ) forge script script/Counter.s.sol:CounterScript ${EXTRA_ARGS} --rpc-url ${BTP_RPC_URL} --unlocked --froms ${BTP_FROM} ; \
64
66
fi
65
67
66
68
cast :
@@ -79,8 +81,8 @@ subgraph:
79
81
@cd subgraph && yq e ' .features = ["nonFatalErrors", "fullTextSearch", "ipfsOnEthereumContracts"]' -i generated/solidity-token-erc20.subgraph.yaml
80
82
@cd subgraph && pnpm graph codegen generated/solidity-token-erc20.subgraph.yaml
81
83
@cd subgraph && pnpm graph build generated/solidity-token-erc20.subgraph.yaml
82
- @eval $$(curl -H "x-auth-token: $${BPT_SERVICE_TOKEN }" -s $${BTP_CLUSTER_MANAGER_URL}/ide/foundry/$${BTP_SCS_ID}/env | sed 's/^/export /' )
83
- @ if [ " $$ {BTP_MIDDLEWARE}" == " " ]; then \
84
+ @eval $$(curl -H "x-auth-token: $${BTP_SERVICE_TOKEN }" -s $${BTP_CLUSTER_MANAGER_URL}/ide/foundry/$${BTP_SCS_ID}/env | sed 's/^/export /' ) ; \
85
+ if [ " $$ {BTP_MIDDLEWARE}" == " " ]; then \
84
86
echo " You have not launched a graph middleware for this smart contract set, aborting..." ; \
85
87
exit 1; \
86
88
else \
0 commit comments