From f8afabedc98464a024087d035932fc6bcd8f6760 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Sun, 7 Jan 2024 22:52:55 +0400 Subject: [PATCH] empty metas --- flake.nix | 17 +---------------- ...eployGenericPoolOrderBookV3ArbOrderTaker.sol | 7 ++----- ...eployGenericPoolOrderBookV3FlashBorrower.sol | 7 ++----- script/DeployOrderBook.sol | 5 ++--- ...oyRouteProcessorOrderBookV3ArbOrderTaker.sol | 7 ++----- 5 files changed, 9 insertions(+), 34 deletions(-) diff --git a/flake.nix b/flake.nix index 03bdcdc8c..62705d292 100644 --- a/flake.nix +++ b/flake.nix @@ -13,28 +13,13 @@ in rec { packages = rec { - concrete-contracts = ["OrderBook" "GenericPoolOrderBookV3FlashBorrower" "GenericPoolOrderBookV3ArbOrderTaker" "RouteProcessorOrderBookV3ArbOrderTaker"]; - build-meta-cmd = contract: '' - rain meta build \ - -i <(rain meta solc artifact -c abi -i out/${contract}.sol/${contract}.json) -m solidity-abi-v2 -t json -e deflate -l en \ - -i src/concrete/${contract}.meta.json -m interpreter-caller-meta-v1 -t json -e deflate -l en \ - ''; - build-single-meta = contract: '' - ${(build-meta-cmd contract)} -o meta/${contract}.rain.meta; - ''; - - build-meta = rainix.mkTask.${system} { name = "build-meta"; body = ('' - set -x; - mkdir -p meta; - forge build --force; - '' + pkgs.lib.concatStrings (map build-single-meta concrete-contracts)); }; - deploy-single-contract = contract: '' forge script script/Deploy${contract}.sol:Deploy${contract} --legacy --verify --broadcast --rpc-url "''${CI_DEPLOY_RPC_URL}" --etherscan-api-key "''${EXPLORER_VERIFICATION_KEY}" \ --sig='run(bytes)' \ "$( ${(build-meta-cmd contract)} -E hex )" \ ; ''; + deploy-contracts = rainix.mkTask.${system} { name = "deploy-contracts"; body = ('' set -euo pipefail; forge build --force; diff --git a/script/DeployGenericPoolOrderBookV3ArbOrderTaker.sol b/script/DeployGenericPoolOrderBookV3ArbOrderTaker.sol index d4952a087..7bca4ea1c 100644 --- a/script/DeployGenericPoolOrderBookV3ArbOrderTaker.sol +++ b/script/DeployGenericPoolOrderBookV3ArbOrderTaker.sol @@ -13,13 +13,10 @@ import {I9R_DEPLOYER} from "./DeployConstants.sol"; /// is intended to be run on every commit by CI to a testnet such as mumbai, then /// cross chain deployed to whatever mainnet is required, by users. contract DeployGenericPoolOrderBookV3ArbOrderTaker is Script { - /// We are avoiding using ffi here, instead forcing the script runner to - /// provide the built metadata. On CI this is achieved by using the rain cli. - function run(bytes memory meta) external { + function run() external { uint256 deployerPrivateKey = vm.envUint("DEPLOYMENT_KEY"); - console2.log("GenericPoolOrderBookV3ArbOrderTaker meta hash:"); - console2.logBytes32(keccak256(meta)); + bytes memory meta = hex""; vm.startBroadcast(deployerPrivateKey); GenericPoolOrderBookV3ArbOrderTaker deployed = diff --git a/script/DeployGenericPoolOrderBookV3FlashBorrower.sol b/script/DeployGenericPoolOrderBookV3FlashBorrower.sol index 5f18a1719..fb3b9a4df 100644 --- a/script/DeployGenericPoolOrderBookV3FlashBorrower.sol +++ b/script/DeployGenericPoolOrderBookV3FlashBorrower.sol @@ -13,13 +13,10 @@ import {I9R_DEPLOYER} from "./DeployConstants.sol"; /// is intended to be run on every commit by CI to a testnet such as mumbai, then /// cross chain deployed to whatever mainnet is required, by users. contract DeployGenericPoolOrderBookV3FlashBorrower is Script { - /// We are avoiding using ffi here, instead forcing the script runner to - /// provide the built metadata. On CI this is achieved by using the rain cli. - function run(bytes memory meta) external { + function run() external { uint256 deployerPrivateKey = vm.envUint("DEPLOYMENT_KEY"); - console2.log("DeployGenericPoolOrderBookV3FlashBorrower meta hash:"); - console2.logBytes32(keccak256(meta)); + bytes memory meta = hex""; vm.startBroadcast(deployerPrivateKey); GenericPoolOrderBookV3FlashBorrower deployed = diff --git a/script/DeployOrderBook.sol b/script/DeployOrderBook.sol index f2af4a542..2cea45ac2 100644 --- a/script/DeployOrderBook.sol +++ b/script/DeployOrderBook.sol @@ -6,11 +6,10 @@ import {OrderBook, DeployerDiscoverableMetaV3ConstructionConfig} from "src/concr import {I9R_DEPLOYER} from "./DeployConstants.sol"; contract DeployOrderBook is Script { - function run(bytes memory meta) external { + function run() external { uint256 deployerPrivateKey = vm.envUint("DEPLOYMENT_KEY"); - console2.log("DeployOrderBook meta hash:"); - console2.logBytes32(keccak256(meta)); + bytes memory meta = hex""; vm.startBroadcast(deployerPrivateKey); OrderBook deployed = new OrderBook(DeployerDiscoverableMetaV3ConstructionConfig(I9R_DEPLOYER, meta)); diff --git a/script/DeployRouteProcessorOrderBookV3ArbOrderTaker.sol b/script/DeployRouteProcessorOrderBookV3ArbOrderTaker.sol index 07fef9cf7..7ce750908 100644 --- a/script/DeployRouteProcessorOrderBookV3ArbOrderTaker.sol +++ b/script/DeployRouteProcessorOrderBookV3ArbOrderTaker.sol @@ -13,13 +13,10 @@ import {I9R_DEPLOYER} from "./DeployConstants.sol"; /// is intended to be run on every commit by CI to a testnet such as mumbai, then /// cross chain deployed to whatever mainnet is required, by users. contract DeployRouteProcessorOrderBookV3ArbOrderTaker is Script { - /// We are avoiding using ffi here, instead forcing the script runner to - /// provide the built metadata. On CI this is achieved by using the rain cli. - function run(bytes memory meta) external { + function run() external { uint256 deployerPrivateKey = vm.envUint("DEPLOYMENT_KEY"); - console2.log("RouteProcessorOrderBookV3ArbOrderTaker meta hash:"); - console2.logBytes32(keccak256(meta)); + bytes memory meta = hex""; vm.startBroadcast(deployerPrivateKey); RouteProcessorOrderBookV3ArbOrderTaker deployed =