-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (39 loc) · 1.52 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
include .env
export
.PHONY: deps
deps:
forge install --no-commit axelarnetwork/axelar-gmp-sdk-solidity axelarnetwork/interchain-token-service openzeppelin/openzeppelin-contracts
.PHONY: help
help:
@echo "\033[0;32mAvailable targets:\033[0m"
@echo "deps - Install Foundry dependencies"
@echo "deploy-sender - Deploy the token sender contract on Polygon Mumbai"
@echo "deploy-handler - Deploy the token handler contract on Filecoin Calibrationnet"
@echo "deposit - Deposit tokens into the subnet"
.PHONY: deploy-handler
deploy-handler:
forge script ./script/DeployTokenHandler.s.sol \
--rpc-url "${$(DEST_NETWORK)__RPC_URL}" \
--broadcast \
--skip-simulation
.PHONY: deploy-sender
deploy-sender:
forge script ./script/DeployTokenSender.s.sol \
--rpc-url "${$(ORIGIN_NETWORK)__RPC_URL}" \
--broadcast \
--skip-simulation
.PHONY: deposit
deposit:
@echo "Please enter the details:"; \
read -p "Beneficiary: " BENEFICIARY; \
read -p "Amount: " AMOUNT; \
read -p "Token ID (as registered in Axelar): " TOKEN_ID; \
read -p "Destination subnet root [314159]: " SUBNET_ROOT; \
read -p "Destination subnet address: " SUBNET_ADDR; \
read -p "Gas payment (in origin's native coin) [350000000000000000]: " GAS_PAYMENT; \
forge script ./script/Deposit.s.sol \
--rpc-url "${$(ORIGIN_NETWORK)__RPC_URL}" \
--broadcast \
--sig "run(bytes32,uint256,uint256,address,uint64,address)" \
-vvv \
$$TOKEN_ID $$AMOUNT $${GAS_PAYMENT:-350000000000000000} $$BENEFICIARY $${SUBNET_ROOT:-314159} $$SUBNET_ADDR