-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
203 additions
and
325 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
packages/foundry/broadcast/Deploy.s.sol/84532/run-1733558607.json
Large diffs are not rendered by default.
Oops, something went wrong.
53 changes: 53 additions & 0 deletions
53
packages/foundry/broadcast/Deploy.s.sol/84532/run-1733559212.json
Large diffs are not rendered by default.
Oops, something went wrong.
53 changes: 53 additions & 0 deletions
53
packages/foundry/broadcast/Deploy.s.sol/84532/run-latest.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,20 @@ | ||
[profile.default] | ||
src = 'contracts' | ||
out = 'out' | ||
libs = ['lib'] | ||
fs_permissions = [{ access = "read-write", path = "./"}] | ||
src = "src" | ||
out = "out" | ||
libs = ["lib"] | ||
via_ir = true # Add this | ||
optimizer = true # Make sure optimizer is on | ||
optimizer_runs = 200 | ||
|
||
[rpc_endpoints] | ||
default_network = "http://127.0.0.1:8545" | ||
localhost = "http://127.0.0.1:8545" | ||
|
||
mainnet = "https://eth-mainnet.alchemyapi.io/v2/${ALCHEMY_API_KEY}" | ||
sepolia = "https://eth-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY}" | ||
arbitrum = "https://arb-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}" | ||
arbitrumSepolia = "https://arb-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY}" | ||
optimism = "https://opt-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}" | ||
optimismSepolia = "https://opt-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY}" | ||
polygon = "https://polygon-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}" | ||
polygonMumbai = "https://polygon-mumbai.g.alchemy.com/v2/${ALCHEMY_API_KEY}" | ||
polygonZkEvm = "https://zkevm-rpc.com" | ||
polygonZkEvmTestnet = "https://rpc.public.zkevm-test.net" | ||
gnosis = "https://rpc.gnosischain.com" | ||
chiado = "https://rpc.chiadochain.net" | ||
base = "https://mainnet.base.org" | ||
baseSepolia = "https://sepolia.base.org" | ||
scrollSepolia = "https://sepolia-rpc.scroll.io" | ||
scroll = "https://rpc.scroll.io" | ||
pgn = "https://rpc.publicgoods.network" | ||
pgnTestnet = "https://sepolia.publicgoods.network" | ||
[rpc_endpoints] | ||
amoy = "https://80002.rpc.thirdweb.com" | ||
base_sepolia = "https://84532.rpc.thirdweb.com" | ||
bsc_testnet = "https://97.rpc.thirdweb.com" | ||
|
||
[etherscan] | ||
polygonMumbai = { key = "${ETHERSCAN_API_KEY}" } | ||
sepolia = { key = "${ETHERSCAN_API_KEY}" } | ||
|
||
|
||
[fmt] | ||
multiline_func_header = "params_first" | ||
line_length = 80 | ||
tab_width = 2 | ||
quote_style = "double" | ||
bracket_spacing = true | ||
int_types = "long" | ||
amoy = { key = "${POLYGONSCAN_KEY}" } | ||
base_sepolia = { key = "${BASESCAN_KEY}" } | ||
bsc_testnet = { key = "${BSCSCAN_KEY}" } | ||
|
||
# See more config options https://github.com/foundry-rs/foundry/tree/master/config | ||
# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,31 @@ | ||
//SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.19; | ||
pragma solidity ^0.8.20; | ||
|
||
import "./DeployHelpers.s.sol"; | ||
import { DeployYourContract } from "./DeployYourContract.s.sol"; | ||
import "forge-std/Script.sol"; | ||
import "../contracts/rails/ZKRailUPI.sol"; | ||
import "@openzeppelin/contracts/utils/Create2.sol"; | ||
|
||
contract DeployScript is ScaffoldETHDeploy { | ||
function run() external { | ||
DeployYourContract deployYourContract = new DeployYourContract(); | ||
deployYourContract.run(); | ||
contract DeployZKRail is Script { | ||
bytes32 public constant SALT = bytes32(uint256(0x1234)); | ||
// OpenZeppelin's Create2 Deployer address (same on all chains) | ||
address constant CREATE2_DEPLOYER = | ||
0x4e59b44847b379578588920cA78FbF26c0B4956C; | ||
|
||
// deploy more contracts here | ||
// DeployMyContract deployMyContract = new DeployMyContract(); | ||
// deployMyContract.run(); | ||
} | ||
function run() external { | ||
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); | ||
vm.startBroadcast(deployerPrivateKey); | ||
|
||
// Compute the deployment address | ||
bytes memory creationCode = type(ZKRailUPI).creationCode; | ||
address computedAddress = Create2.computeAddress( | ||
SALT, | ||
keccak256(creationCode), | ||
CREATE2_DEPLOYER | ||
); | ||
console.log("Computed deployment address:", computedAddress); | ||
|
||
address token = Create2.deploy(0, SALT, creationCode); | ||
require(token == computedAddress, "Deployment address mismatch"); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.