Skip to content

Commit

Permalink
chore: add test script
Browse files Browse the repository at this point in the history
Signed-off-by: GopherJ <[email protected]>
  • Loading branch information
GopherJ committed Sep 27, 2023
1 parent d236d7c commit 906da06
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,10 @@ zksync-bytecode-hashes:
redeploy-market:
make SCRIPT_PATH=./scripts/dev/15.redeploy-market.ts run

.PHONY: fix-shortfalls
fix-shortfalls:
make SCRIPT_PATH=./scripts/dev/16.fix-shortfalls.ts run

.PHONY: transfer-tokens
transfer-tokens:
make SCRIPT_PATH=./scripts/dev/2.transfer-tokens.ts run
Expand Down
12 changes: 6 additions & 6 deletions market-config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -839,18 +839,18 @@ export const LineaConfig: IParaSpaceConfiguration = {
export const MainnetConfig: IParaSpaceConfiguration = {
// BASIC INFO
...CommonConfig,
ParaSpaceAdmin: "0x19293FBec52F94165f903708a74513Dd6dFedd0a",
ParaSpaceAdmin: "0xe965198731CDdB2f06e91DD0CDff74b71e4b3714",
EmergencyAdmins: [
"0x17816E9A858b161c3E37016D139cf618056CaCD4",
"0x69FAD68De47D5666Ad668C7D682dDb8FD6322949",
"0x2f2d07d60ea7330DD2314f4413CCbB2dC25276EF",
"0x001e2bcC5c1BfC3131d33Ba074B12c2F1237FB04",
"0x4AC3fD073786a971e1B8dE5a526959c9B3B2B407",
],
RiskAdmin: "0x19293FBec52F94165f903708a74513Dd6dFedd0a",
GatewayAdmin: "0x19293FBec52F94165f903708a74513Dd6dFedd0a",
ParaSpaceTeam: "0x19293FBec52F94165f903708a74513Dd6dFedd0a",
Treasury: "0x19293FBec52F94165f903708a74513Dd6dFedd0a",
RiskAdmin: "0xe965198731CDdB2f06e91DD0CDff74b71e4b3714",
GatewayAdmin: "0xe965198731CDdB2f06e91DD0CDff74b71e4b3714",
ParaSpaceTeam: "0xe965198731CDdB2f06e91DD0CDff74b71e4b3714",
Treasury: "0xe965198731CDdB2f06e91DD0CDff74b71e4b3714",
Tokens: {
WETH: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
stETH: "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84",
Expand Down Expand Up @@ -992,7 +992,7 @@ export const MainnetConfig: IParaSpaceConfiguration = {
DelegationRegistry: "0x00000000000076A84feF008CDAbe6409d2FE638B",
Governance: {
Multisend: MULTI_SEND || "0x40A2aCCbd92BCA938b02010E17A5b8929b49130D",
Multisig: MULTI_SIG || "0x19293FBec52F94165f903708a74513Dd6dFedd0a",
Multisig: MULTI_SIG || "0xe965198731CDdB2f06e91DD0CDff74b71e4b3714",
},
ParaSpaceV1: {
PoolV1: "0x638a98BBB92a7582d07C52ff407D49664DC8b3Ee",
Expand Down
40 changes: 40 additions & 0 deletions scripts/dev/16.fix-shortfalls.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import rawBRE from "hardhat";
import {getPoolProxy} from "../../helpers/contracts-getters";
import {dryRunEncodedData} from "../../helpers/contracts-helpers";
import {upgradePoolParameters} from "../upgrade/pool";

const fixShortfalls = async () => {
console.time("fix-shortfalls");
await upgradePoolParameters(
"0x64d0680889A1f6cFF8De6632e2C4B93957169E28",
false
);
const pool = await getPoolProxy();
const encodedData = pool.interface.encodeFunctionData("fixShortfalls", [
[
"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"0xdAC17F958D2ee523a2206206994597C13D831ec7",
"0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
"0x4d224452801ACEd8B2F0aebE155379bb5D594381",
"0xC5c9fB6223A989208Df27dCEE33fC59ff5c26fFF",
"0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84",
"0x5283D291DBCF85356A21bA090E6db59121208b44",
"0x6B175474E89094C44Da98b954EedeAC495271d0F",
],
]);
await dryRunEncodedData(pool.address, encodedData);
console.timeEnd("fix-shortfalls");
};

async function main() {
await rawBRE.run("set-DRE");
await fixShortfalls();
}

main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});

0 comments on commit 906da06

Please sign in to comment.