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

feat: yarn workspace command #595

Merged
merged 2 commits into from
Apr 4, 2023
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
3 changes: 2 additions & 1 deletion packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"clean:forge": "forge clean",
"build": "forge build",
"forge:install": "forge install",
"_hardhat-task": "tsx ./scripts/task/task.ts"
"_hardhat-task": "tsx ./scripts/task/task.ts",
"migrate:metapool": "tsx ./scripts/task/dollar/MigrateMetapool.ts"
},
"keywords": [
"stablecoin",
Expand Down
19 changes: 19 additions & 0 deletions packages/contracts/scripts/task/dollar/MigrateMetapool.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { spawnSync } from "child_process";
import { loadEnv } from "../../shared";
import fs from "fs";
import path from "path";

const envPath = path.join(__dirname, "../../../.env");
if (!fs.existsSync(envPath)) {
throw new Error("Env file not found");
}
const env = loadEnv(envPath);

const rpcUrl = env.rpcUrl as string;

const migrateMetapool = async () => {
console.log("Running Solidity Script to Migrate Metapool Funds");
spawnSync("forge", ["script", "scripts/task/dollar/MigrateMetapool.s.sol", "--fork-url", rpcUrl, "--broadcast"]);
};

migrateMetapool();