Skip to content

Commit

Permalink
tested makefile on bpaas
Browse files Browse the repository at this point in the history
  • Loading branch information
bl0up committed Apr 30, 2024
1 parent 553a2cb commit 1dc0e54
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,12 @@ deploy-btp:
subgraph:
@echo "Deploying the subgraph..."
@rm -Rf subgraph/subgraph.config.json
@output=$(jq ' \
.transactions[] | \
select(.transactionType == "CREATE" and (.contractName == "GenericToken" or .contractName == "Diamond")) | \
if .contractName == "GenericToken" then \
{contractAddress: .contractAddress, transactionHash: .hash} \
elif .contractName == "Diamond" then \
{contractAddress: .contractAddress, transactionHash: .hash} \
end; \
' broadcast/DeployDiamond.s.sol/31337/run-latest.json); \
.PHONY: deploy-contracts
deploy-contracts:
@output=$$(jq '.transactions[] | select(.transactionType == "CREATE" and (.contractName == "GenericToken" or .contractName == "Diamond")) | if .contractName == "GenericToken" then {contractName: "GenericToken", contractAddress: .contractAddress, transactionHash: .hash} elif .contractName == "Diamond" then {contractName: "Diamond", contractAddress: .contractAddress, transactionHash: .hash} end' broadcast/DeployDiamond.s.sol/42541/run-latest.json); \
DEPLOYED_ERC20_ADDRESS=$$(echo $$output | jq -r 'select(.contractName == "GenericToken") | .contractAddress'); \
TRANSACTION_HASH_ERC20=$$(echo $$output | jq -r 'select(.contractName

DEPLOYED_ERC20_ADDRESS=$(echo "$$output" | jq -r 'select(.contractName == "GenericToken") | .contractAddress'); \
TRANSACTION_HASH_ERC20=$(echo "$$output" | jq -r 'select(.contractName == "GenericToken") | .transactionHash');\
DEPLOYED_ADDRESS=$(echo "$$output" | jq -r 'select(.contractName == "Diamond") | .contractAddress'); \
Expand Down

0 comments on commit 1dc0e54

Please sign in to comment.