Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to deploy OptimismMintableERC20 USDT token using OptimismMintableERC20Factory #155

Merged
merged 11 commits into from
Jun 6, 2024
3 changes: 3 additions & 0 deletions .env.mainnet
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ DETERMINISTIC_ADDRESS_SALT="lisk_l2_token_deterministic_salt"
# L1 standard bridge address (Mainnet, Goerli, Sepolia or custom)
L1_STANDARD_BRIDGE_ADDR=0x2658723Bf70c7667De6B25F99fcce13A16D25d08

# L1 USDT token contract address to be bridged to L2
REMOTE_TOKEN_ADDR_USDT=0xdAC17F958D2ee523a2206206994597C13D831ec7

# L1 RPC URL, e.g. Infura, Alchemy, or your own node
L1_RPC_URL=https://eth.drpc.org

Expand Down
3 changes: 3 additions & 0 deletions .env.testnet
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ DETERMINISTIC_ADDRESS_SALT="lisk_l2_token_salt_test_network"
# L1 standard bridge address (Mainnet, Goerli, Sepolia or custom)
L1_STANDARD_BRIDGE_ADDR=0x1Fb30e446eA791cd1f011675E5F3f5311b70faF5

# L1 USDT token contract address to be bridged to L2
REMOTE_TOKEN_ADDR_USDT=0x7169d38820dfd117c3fa1f22a697dba58d90ba06

# L1 RPC URL, e.g. Infura, Alchemy, or your own node
L1_RPC_URL=https://sepolia.drpc.org

Expand Down
17 changes: 17 additions & 0 deletions script/6_deployUSDTContract.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

echo "Instructing the shell to exit immediately if any command returns a non-zero exit status..."
set -e
echo "Done."

echo "Navigating to the root directory of the project..."
cd ../
echo "Done."

echo "Setting environment variables..."
source .env
Incede marked this conversation as resolved.
Show resolved Hide resolved
echo "Done."

echo "Deploying OptimismMintableERC20 USDT token smart contract..."
# Use flag --nonce to specify suitable nonce in case of nonce mismatch
cast send --rpc-url $L2_RPC_URL "0x4200000000000000000000000000000000000012" "createOptimismMintableERC20WithDecimals(address,string,string,uint8)" $REMOTE_TOKEN_ADDR_USDT "Tether USD" "USDT" 6 -i