Skip to content

Commit

Permalink
little fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
calvogenerico committed Dec 6, 2024
1 parent 5daf0b8 commit 6e6f8dc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions contracts/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ bracket_spacing = true
int_types = "long"

# See more config options https://github.com/foundry-rs/foundry/tree/master/config


[profile.default.zksync]
zksolc = "1.5.6"
6 changes: 3 additions & 3 deletions contracts/scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ DEPLOYER_ADDRESS=$(get_address_from_private_key $PRIVATE_KEY)
forge build --zksync

# Deploy ERC20 tokens
dai_address=$(forge create --rpc-url $RPC_URL --private-key $PRIVATE_KEY --zksync contracts/TestnetERC20Token.sol:TestnetERC20Token --constructor-args "DAI" "DAI" 18 | extract_deployed_address)
wbtc_address=$(forge create --rpc-url $RPC_URL --private-key $PRIVATE_KEY --zksync contracts/TestnetERC20Token.sol:TestnetERC20Token --constructor-args "WBTC" "WBTC" 18 | extract_deployed_address)
dai_address=$(forge create --rpc-url $RPC_URL --private-key $PRIVATE_KEY --zksync src/TestnetERC20Token.sol:TestnetERC20Token --constructor-args "DAI" "DAI" 18 | extract_deployed_address)
wbtc_address=$(forge create --rpc-url $RPC_URL --private-key $PRIVATE_KEY --zksync src/TestnetERC20Token.sol:TestnetERC20Token --constructor-args "WBTC" "WBTC" 18 | extract_deployed_address)

# Mint tokens
cast send --rpc-url $RPC_URL --private-key $PRIVATE_KEY $dai_address "mint(address,uint256)" $DEPLOYER_ADDRESS 1000000000000000000000000 # 1 million DAI
cast send --rpc-url $RPC_URL --private-key $PRIVATE_KEY $wbtc_address "mint(address,uint256)" $DEPLOYER_ADDRESS 100000000000000000000000 # 100,000 WBTC

# Deploy CPAMM
cpamm_address=$(forge create --rpc-url $RPC_URL --private-key $PRIVATE_KEY --zksync contracts/CPAMM.sol:CPAMM --constructor-args $dai_address $wbtc_address | extract_deployed_address)
cpamm_address=$(forge create --rpc-url $RPC_URL --private-key $PRIVATE_KEY --zksync src/CPAMM.sol:CPAMM --constructor-args $dai_address $wbtc_address | extract_deployed_address)

echo "DAI: $dai_address"
echo "WBTC: $wbtc_address"
Expand Down
2 changes: 2 additions & 0 deletions web/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ NEXT_PUBLIC_CHAIN_ID=
NEXT_PUBLIC_CPAMM_ADDRESS=
NEXT_PUBLIC_DAI_ADDRESS=
NEXT_PUBLIC_WBTC_ADDRESS=
NEXT_PUBLIC_CHAIN_NAME=
NEXT_PUBLIC_BLOCK_EXPLORER_URL=

0 comments on commit 6e6f8dc

Please sign in to comment.