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

little fixes. #1

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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=
Loading