Skip to content

Commit

Permalink
chore: remove lcdPort and rpcPort in config
Browse files Browse the repository at this point in the history
  • Loading branch information
npty committed Oct 27, 2023
1 parent 52127d1 commit eabc92b
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 14 deletions.
1 change: 0 additions & 1 deletion packages/axelar-local-dev-cosmos/jest/jest.global-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ import { stopAll, startAll } from "../src/docker";

export default async () => {
await startAll();
// await new Promise((resolve) => setTimeout(resolve, 3000));
};
3 changes: 0 additions & 3 deletions packages/axelar-local-dev-cosmos/src/axelar/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import path from "path";
import { ChainConfig } from "../types";

export const defaultConfig: ChainConfig = {
lcdPort: 11317,
rpcPort: 36657,
healthcheckEndpoint: "health",
dockerPath: path.join(__dirname, "../../docker/axelar"),
};
export const getOwnerAccount = () => {};
7 changes: 3 additions & 4 deletions packages/axelar-local-dev-cosmos/src/docker/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export function getChainConfig(chain: CosmosChain) {
}

export function createContainerEnv(chain: CosmosChain, options: ChainConfig) {
const { dockerPath, rpcPort, lcdPort } = options;
const { dockerPath } = options;
const envPath = path.join(dockerPath, ".env");
const env = `CHAIN_ID=${chain}\nCHAIN_LCD_PORT=${lcdPort}\nCHAIN_RPC_PORT=${rpcPort}\nMONIKER=${chain}`;
const env = `CHAIN_ID=${chain}\nMONIKER=${chain}`;
fs.writeFileSync(envPath, env);
}

Expand All @@ -50,11 +50,10 @@ export async function getOwnerAccount(chain: CosmosChain) {
* If response isn't 200 within {timeout}, throws an error.
*/
export async function waitForRpc(chain: CosmosChain, config: ChainConfig) {
const { healthcheckEndpoint } = config;
const start = Date.now();
const timeout = 60000;
const interval = 3000;
const url = `http://localhost/${chain}-rpc/${healthcheckEndpoint}`;
const url = `http://localhost/${chain}-rpc/health`;
let status = 0;
while (Date.now() - start < timeout) {
try {
Expand Down
3 changes: 0 additions & 3 deletions packages/axelar-local-dev-cosmos/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ export interface CosmosChainInfo {
}

export type ChainConfig = {
lcdPort: number;
rpcPort: number;
healthcheckEndpoint: string;
dockerPath: string;
};

Expand Down
3 changes: 0 additions & 3 deletions packages/axelar-local-dev-cosmos/src/wasm/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,5 @@ import path from "path";
import { ChainConfig } from "../types";

export const defaultConfig: ChainConfig = {
lcdPort: 1317,
rpcPort: 26657,
healthcheckEndpoint: "health",
dockerPath: path.join(__dirname, "../../docker/wasm"),
};

0 comments on commit eabc92b

Please sign in to comment.