Skip to content

Commit

Permalink
fix: update configs (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra authored Jan 25, 2025
1 parent 611e5ad commit a440288
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 47 deletions.
14 changes: 5 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@ deploy-zksync :; FOUNDRY_PROFILE=zksync forge script zksync/script/DeployTranspa

# ---------------------------------------------- BASE SCRIPT CONFIGURATION ---------------------------------------------

BASE_LEDGER = --legacy --mnemonics foo --ledger --mnemonic-indexes $(MNEMONIC_INDEX) --sender $(LEDGER_SENDER)
BASE_LEDGER = --ledger --mnemonic-indexes $(MNEMONIC_INDEX) --sender $(LEDGER_SENDER)
BASE_KEY = --private-key ${PRIVATE_KEY}

custom_ethereum := --with-gas-price 25000000000 # 53 gwei
custom_polygon := --with-gas-price 170000000000 # 560 gwei
custom_avalanche := --with-gas-price 27000000000 # 27 gwei
custom_metis-testnet := --legacy --verifier-url https://goerli.explorer.metisdevops.link/api/
custom_metis := --verifier-url https://andromeda-explorer.metis.io/api/

# params:
# 1 - path/file_name
# 2 - network name
Expand All @@ -35,9 +29,9 @@ custom_metis := --verifier-url https://andromeda-explorer.metis.io/api/
# to use ledger, set LEDGER=true to env
# default to testnet deployment, to run production, set PROD=true to env
define deploy_single_fn
forge script \
FOUNDRY_PROFILE=$(2) forge script \
script/$(1).s.sol:$(if $(3),$(3),$(shell UP=$(if $(PROD),$(2),$(2)_testnet); echo $${UP} | perl -nE 'say ucfirst')) \
--rpc-url $(if $(PROD),$(2),$(2)-testnet) --broadcast --verify --slow -vvvv \
--rpc-url $(if $(PROD),$(2),$(2)-testnet) --broadcast --slow -vvvv \
$(if $(LEDGER),$(BASE_LEDGER),$(BASE_KEY)) \
$(custom_$(if $(PROD),$(2),$(2)-testnet))

Expand All @@ -49,3 +43,5 @@ endef

deploy-create3-factory:
$(call deploy_fn,DeployCreate3Factory,ethereum avalanche polygon optimism arbitrum binance base metis,DeployCreate3Factory)
deploy-proxy-factory:
$(call deploy_fn,DeployTransparentProxyFactory,linea,DeployTransparentProxyFactory)
64 changes: 28 additions & 36 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,62 +9,54 @@ remappings = []
optimizer = true
optimizer_runs = 200
solc = '0.8.27'
bytecode_hash = 'none'

[profile.zksync]
src = 'zksync/src'
test = 'zksync/test'
script = 'zksync/script'
libs = ['lib']
solc = '0.8.24'
solc = '0.8.27'
evm_version = 'cancun'
optimizer = true
optimizer_runs = 200
bytecode_hash = 'none'

[profile.zksync.zksync]
fallback_oz = true
mode = "3"
zksolc = "1.5.4"
zksolc = "1.5.10"

[profile.linea]
evm_version = 'london'

# See more config options https://github.com/gakonst/foundry/tree/master/config
[rpc_endpoints]
ethereum = "${RPC_MAINNET}"
ethereum-testnet = "${RPC_MAINNET_TESTNET}"
### foundry toml ###
mainnet = "${RPC_MAINNET}"
polygon = "${RPC_POLYGON}"
polygon-testnet = "${RPC_POLYGON_TESTNET}"
arbitrum = "${RPC_ARBITRUM}"
arbitrum-testnet = "${RPC_ARBITRUM_TESTNET}"
metis = "${RPC_METIS}"
metis-testnet = "${RPC_METIS_TESTNET}"
polygon_amoy = "${RPC_POLYGON_AMOY}"
avalanche = "${RPC_AVALANCHE}"
avalanche-testnet = "${RPC_AVALANCHE_TESTNET}"
optimism = "${RPC_OPTIMISM}"
optimism-testnet = "${RPC_OPTIMISM_TESTNET}"
avalanche_fuji = "${RPC_AVALANCHE_FUJI}"
arbitrum = "${RPC_ARBITRUM}"
arbitrum_sepolia = "${RPC_ARBITRUM_SEPOLIA}"
fantom = "${RPC_FANTOM}"
fantom-testnet = "${RPC_FANTOM_TESTNET}"
binance = "${RPC_BINANCE}"
binance-testnet = "${RPC_BINANCE_TESTNET}"
fantom_testnet = "${RPC_FANTOM_TESTNET}"
optimism = "${RPC_OPTIMISM}"
optimism_sepolia = "${RPC_OPTIMISM_SEPOLIA}"
harmony = "${RPC_HARMONY}"
sepolia = "${RPC_SEPOLIA}"
scroll = "${RPC_SCROLL}"
scroll_sepolia = "${RPC_SCROLL_SEPOLIA}"
metis = "${RPC_METIS}"
base = "${RPC_BASE}"
base_sepolia = "${RPC_BASE_SEPOLIA}"
bnb = "${RPC_BNB}"
gnosis = "${RPC_GNOSIS}"
zkEVM = "${RPC_ZKEVM}"
celo = "${RPC_CELO}"
zksync = "${RPC_ZKSYNC}"
zksync-testnet = "${RPC_ZKSYNC_TESTNET}"

[etherscan]
ethereum = { key = "${ETHERSCAN_API_KEY_MAINNET}", chain = 1 }
ethereum-testnet = { key = "${ETHERSCAN_API_KEY_MAINNET}", chain = 1 }
optimism = { key = "${ETHERSCAN_API_KEY_OPTIMISM}", chain = 10 }
optimism-testnet = { key = "${ETHERSCAN_API_KEY_OPTIMISM}", chain = 10 }
avalanche = { key = "${ETHERSCAN_API_KEY_AVALANCHE}", chain = 43114 }
avalanche-testnet = { key = "${ETHERSCAN_API_KEY_AVALANCHE}", chain = 43114 }
polygon = { key = "${ETHERSCAN_API_KEY_POLYGON}", chain = 137 }
polygon-testnet = { key = "${ETHERSCAN_API_KEY_POLYGON}", chain = 137 }
arbitrum = { key = "${ETHERSCAN_API_KEY_ARBITRUM}", chain = 42161 }
arbitrum-testnet = { key = "${ETHERSCAN_API_KEY_ARBITRUM}", chain = 42161 }
metis = { key = "any", chain = 1088, url = 'https://andromeda-explorer.metis.io/' }
metis-testnet = { key = "any", chain = 599, url = 'https://goerli.explorer.metisdevops.link/' }
fantom = { key = "${ETHERSCAN_API_KEY_FANTOM}", chain = 250 }
fantom-testnet = { key = "${ETHERSCAN_API_KEY_FANTOM}", chain = 250 }
binance = { key = "${ETHERSCAN_API_KEY_BINANCE}", chain = 56 }
binance-testnet = { key = "${ETHERSCAN_API_KEY_BINANCE}", chain = 56 }
zksync = { key = "${ETHERSCAN_API_KEY_ZKSYNC}", chain = 324 }
zksync-testnet = { key = "${ETHERSCAN_API_KEY_ZKSYNC}", chain = 300, url = 'https://api-sepolia-era.zksync.network/api' }
linea = "${RPC_LINEA}"

[fuzz]
no_zksync_reserved_addresses = true
Expand Down
4 changes: 2 additions & 2 deletions script/DeployTransparentProxyFactory.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ pragma solidity ^0.8.0;
import {Script} from 'forge-std/Script.sol';
import {TransparentProxyFactory} from '../src/contracts/transparent-proxy/TransparentProxyFactory.sol';

contract Deploy is Script {
contract DeployTransparentProxyFactory is Script {
function run() external {
vm.startBroadcast();
new TransparentProxyFactory();
new TransparentProxyFactory{salt: 'aave'}();
vm.stopBroadcast();
}
}

0 comments on commit a440288

Please sign in to comment.