Skip to content

Commit

Permalink
Fix scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
yorhodes authored and byeongsu-hong committed Jan 15, 2024
1 parent cdec17f commit d9d8937
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 27 deletions.
14 changes: 7 additions & 7 deletions scripts/action/ism.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { Command } from "commander";
import { ExecuteResult } from "@cosmjs/cosmwasm-stargate";
import { Command } from "commander";

import { version } from "../package.json";
import { config, getSigningClient } from "../src/config";
import { loadContext } from "../src/load_context";
import { ContractFetcher } from "./fetch";
import {
HplMailbox,
HplIgp,
HplIgpGasOracle,
HplHookMerkle,
HplIgp,
HplIgpOracle,
HplIsmAggregate,
HplMailbox,
} from "../src/contracts";
import { loadContext } from "../src/load_context";
import { ContractFetcher } from "./fetch";

const program = new Command();

Expand Down Expand Up @@ -51,7 +51,7 @@ function makeHandler(
const fetcher = new ContractFetcher(ctx, client);
const mailbox = fetcher.get(HplMailbox, "hpl_mailbox");
const igp = fetcher.get(HplIgp, "hpl_igp");
const igp_oracle = fetcher.get(HplIgpGasOracle, "hpl_igp_oracle");
const igp_oracle = fetcher.get(HplIgpOracle, "hpl_igp_oracle");
const hook_merkle = fetcher.get(HplHookMerkle, "hpl_hook_merkle");
const hook_aggregate = fetcher.get(HplIsmAggregate, "hpl_hook_aggregate");

Expand Down
18 changes: 9 additions & 9 deletions scripts/action/mailbox.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { Command } from "commander";
import { ExecuteResult } from "@cosmjs/cosmwasm-stargate";
import { Command } from "commander";

import { version } from "../package.json";
import { config, getSigningClient } from "../src/config";
import {
HplHookMerkle,
HplIgp,
HplIgpOracle,
HplIsmAggregate,
HplMailbox,
} from "../src/contracts";
import { addPad } from "../src/conv";
import { loadContext } from "../src/load_context";
import { ContractFetcher } from "./fetch";
import {
HplMailbox,
HplIgp,
HplIgpGasOracle,
HplHookMerkle,
HplIsmAggregate,
} from "../src/contracts";

const program = new Command();

Expand Down Expand Up @@ -54,7 +54,7 @@ function makeHandler(
const fetcher = new ContractFetcher(ctx, client);
const mailbox = fetcher.get(HplMailbox, "hpl_mailbox");
const igp = fetcher.get(HplIgp, "hpl_igp");
const igp_oracle = fetcher.get(HplIgpGasOracle, "hpl_igp_oracle");
const igp_oracle = fetcher.get(HplIgpOracle, "hpl_igp_oracle");
const hook_merkle = fetcher.get(HplHookMerkle, "hpl_hook_merkle");
const hook_aggregate = fetcher.get(HplIsmAggregate, "hpl_hook_aggregate");

Expand Down
7 changes: 7 additions & 0 deletions scripts/src/contracts/hpl_ism_pausable.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { injectable } from "inversify";
import { BaseContract } from "../types";

@injectable()
export class HplIsmPausable extends BaseContract {
contractName: string = "hpl_ism_pausable";
}
5 changes: 3 additions & 2 deletions scripts/src/contracts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export * from "./hpl_igp";
export * from "./hpl_igp_oracle";
export * from "./hpl_ism_aggregate";
export * from "./hpl_ism_multisig";
export * from "./hpl_ism_pausable";
export * from "./hpl_ism_routing";
export * from "./hpl_mailbox";
export * from "./hpl_test_mock_hook";
Expand All @@ -16,10 +17,10 @@ export * from "./hpl_validator_announce";
export * from "./hpl_warp_cw20";
export * from "./hpl_warp_native";

import { readdirSync } from "fs";
import { Context, Contract, ContractConstructor } from "../types";
import { SigningCosmWasmClient } from "@cosmjs/cosmwasm-stargate";
import { readdirSync } from "fs";
import { Container } from "inversify";
import { Context, Contract, ContractConstructor } from "../types";

const contractNames: string[] = readdirSync(__dirname)
.filter((f) => f !== "index.ts")
Expand Down
9 changes: 5 additions & 4 deletions scripts/src/migrations/InitializeStandalone.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { injectable } from "inversify";
import { Context, Migration } from "../types";
import {
HplMailbox,
HplHookMerkle,
HplIgpGasOracle,
HplIgp,
HplIgpOracle,
HplIsmMultisig,
HplMailbox,
HplTestMockHook,
} from "../contracts";
import { Context, Migration } from "../types";

@injectable()
export default class InitializeStandalone implements Migration {
Expand All @@ -18,7 +19,7 @@ export default class InitializeStandalone implements Migration {
private mailbox: HplMailbox,
private hook_merkle: HplHookMerkle,
private igp: HplIgp,
private igp_oracle: HplIgpGasOracle,
private igp_oracle: HplIgpOracle,
private ism_multisig: HplIsmMultisig,
private test_mock_hook: HplTestMockHook
) {}
Expand Down
10 changes: 5 additions & 5 deletions scripts/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {
ExecuteResult,
SigningCosmWasmClient,
ExecuteResult,
SigningCosmWasmClient,
} from "@cosmjs/cosmwasm-stargate";
import { getWasmPath } from "./load_wasm";
import fs from "fs";
import { fromBech32 } from "@cosmjs/encoding";
import fs from "fs";
import { getWasmPath } from "./load_wasm";

export interface ContractContext {
codeId: number | undefined;
Expand Down Expand Up @@ -165,7 +165,7 @@ export interface HplIgpCoreInstantiateMsg {
beneficiary: string;
}

export interface HplIgpGasOracleInstantiateMsg {}
export interface HplIgpOracleInstantiateMsg {}

export interface HplIsmMultisigInstantiateMsg {
owner: string;
Expand Down

0 comments on commit d9d8937

Please sign in to comment.