Skip to content

Commit 9f11ed2

Browse files
committed
chore: update localhost to 127.0.0.1
1 parent 3bbd4dd commit 9f11ed2

File tree

10 files changed

+28
-28
lines changed

10 files changed

+28
-28
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
[[axelar_bridge_evm]]
22
name = "Ethereum"
3-
rpc_addr = "localhost:8500/0"
3+
rpc_addr = "127.0.0.1:8500/0"
44
start-with-bridge = false
55

66
[[axelar_bridge_evm]]
77
name = "Avalanche"
8-
rpc_addr = "localhost:8500/1"
8+
rpc_addr = "127.0.0.1:8500/1"
99
start-with-bridge = false
1010

1111
[[axelar_bridge_evm]]
1212
name = "Fantom"
13-
rpc_addr = "localhost:8500/2"
13+
rpc_addr = "127.0.0.1:8500/2"
1414
start-with-bridge = false
1515

1616
[[axelar_bridge_evm]]
1717
name = "Moonbeam"
18-
rpc_addr = "localhost:8500/3"
18+
rpc_addr = "127.0.0.1:8500/3"
1919
start-with-bridge = false
2020

2121
[[axelar_bridge_evm]]
2222
name = "Polygon"
23-
rpc_addr = "localhost:8500/4"
23+
rpc_addr = "127.0.0.1:8500/4"
2424
start-with-bridge = false

packages/axelar-local-dev-cosmos/docker/wasm/bin/init_wasm.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ wasmd init "$MONIKER" --chain-id ${CHAIN_ID} --home ${HOME} > /dev/null 2>&1 &&
1414
# edit the app.toml file to enable the API and swagger
1515
sed -i '/\[api\]/,/\[/ s/enable = false/enable = true/' "$HOME"/config/app.toml
1616
sed -i '/\[api\]/,/\[/ s/swagger = false/swagger = true/' "$HOME"/config/app.toml
17-
sed -i '/\[api\]/,/\[/ s/address = "tcp:\/\/localhost:1317"/address = "tcp:\/\/0.0.0.0:1317"/' "$HOME"/config/app.toml
17+
sed -i '/\[api\]/,/\[/ s/address = "tcp:\/\/127.0.0.1:1317"/address = "tcp:\/\/0.0.0.0:1317"/' "$HOME"/config/app.toml
1818

1919
# this is essential for sub-1s block times (or header times go crazy)
2020
sed -i 's/"time_iota_ms": "1000"/"time_iota_ms": "10"/' "$HOME"/config/genesis.json

packages/axelar-local-dev-cosmos/jest/jest.global-setup.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { startChains } from "../src/setup";
33
async function waitForRpc(chain: string, timeout = 120000): Promise<void> {
44
const start = Date.now();
55
const interval = 3000;
6-
const url = `http://localhost/${chain}-rpc/health`;
6+
const url = `http://127.0.0.1/${chain}-rpc/health`;
77
let status = 0;
88
while (Date.now() - start < timeout) {
99
try {

packages/axelar-local-dev-cosmos/src/__tests__/DockerService.spec.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ setLogger(() => undefined);
99
describe("DockerService", () => {
1010
it("should start containers successfully", async () => {
1111
const testLcd = "cosmos/base/tendermint/v1beta1/node_info";
12-
const healthAxelarRpc = await fetch("http://localhost/axelar-rpc");
12+
const healthAxelarRpc = await fetch("http://127.0.0.1/axelar-rpc");
1313
const healthAxelarLcd = await fetch(
14-
`http://localhost/axelar-lcd/${testLcd}`
14+
`http://127.0.0.1/axelar-lcd/${testLcd}`
1515
);
16-
const healthWasmRpc = await fetch("http://localhost/wasm-rpc");
17-
const healthWasmLcd = await fetch(`http://localhost/wasm-lcd/${testLcd}`);
16+
const healthWasmRpc = await fetch("http://127.0.0.1/wasm-rpc");
17+
const healthWasmLcd = await fetch(`http://127.0.0.1/wasm-lcd/${testLcd}`);
1818

1919
expect(healthAxelarRpc.status).toBe(200);
2020
expect(healthAxelarLcd.status).toBe(200);
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fetch from "node-fetch";
22

33
export function fetchAxelarLcd(endpoint?: string) {
4-
return fetch(`http://localhost/axelar-lcd/${endpoint}`).then((res) =>
4+
return fetch(`http://127.0.0.1/axelar-lcd/${endpoint}`).then((res) =>
55
res.json()
66
);
77
}

packages/axelar-local-dev-cosmos/src/clients/cosmos/CosmosClient.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ export class CosmosClient {
4646
const defaultDenom = chain === "wasm" ? "uwasm" : "uaxl";
4747
const chainInfo = {
4848
denom: config.denom || defaultDenom,
49-
lcdUrl: config.lcdUrl || `http://localhost/${chain}-lcd`,
50-
rpcUrl: config.rpcUrl || `http://localhost/${chain}-rpc`,
51-
wsUrl: config.wsUrl || `ws://localhost/${chain}-rpc/websocket`,
49+
lcdUrl: config.lcdUrl || `http://127.0.0.1/${chain}-lcd`,
50+
rpcUrl: config.rpcUrl || `http://127.0.0.1/${chain}-rpc`,
51+
wsUrl: config.wsUrl || `ws://127.0.0.1/${chain}-rpc/websocket`,
5252
};
5353
gasPrice = gasPrice || GasPrice.fromString(`1${chainInfo.denom}`);
5454

packages/axelar-local-dev-cosmos/src/config/axelar/config.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const defaultAxelarConfig: ChainConfig = {
4040
export const defaultAxelarChainInfo: Omit<CosmosChainInfo, "owner"> = {
4141
prefix: "axelar",
4242
denom: "uaxl",
43-
lcdUrl: "http://localhost/axelar-lcd",
44-
rpcUrl: "http://localhost/axelar-rpc",
45-
wsUrl: "ws://localhost/axelar-rpc/websocket",
43+
lcdUrl: "http://127.0.0.1/axelar-lcd",
44+
rpcUrl: "http://127.0.0.1/axelar-rpc",
45+
wsUrl: "ws://127.0.0.1/axelar-rpc/websocket",
4646
};

packages/axelar-local-dev-cosmos/src/config/wasm/config.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const defaultWasmConfig: ChainConfig = {
1212
export const defaultWasmChainInfo: Omit<CosmosChainInfo, "owner"> = {
1313
prefix: "wasm",
1414
denom: "uwasm",
15-
lcdUrl: "http://localhost/wasm-lcd",
16-
rpcUrl: "http://localhost/wasm-rpc",
17-
wsUrl: "ws://localhost/wasm-rpc/websocket",
15+
lcdUrl: "http://127.0.0.1/wasm-lcd",
16+
rpcUrl: "http://127.0.0.1/wasm-rpc",
17+
wsUrl: "ws://127.0.0.1/wasm-rpc/websocket",
1818
};

packages/axelar-local-dev-cosmos/src/listeners/AxelarListener.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class AxelarListener {
1616

1717
constructor(config: Pick<CosmosChainInfo, "wsUrl">) {
1818
this.wsMap = new Map();
19-
this.wsUrl = config.wsUrl || `ws://localhost/axelar-rpc/websocket`;
19+
this.wsUrl = config.wsUrl || `ws://127.0.0.1/axelar-rpc/websocket`;
2020
}
2121

2222
private getOrInit(topicId: string) {

packages/axelar-local-dev-cosmos/src/services/DockerService.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ export class DockerService {
4545
await this.waitForRpc(chain, options?.rpcWaitTimeout);
4646
await this.waitForLcd(chain, options?.lcdWaitTimeout);
4747

48-
const rpcUrl = `http://localhost/${chain}-rpc`;
49-
const lcdUrl = `http://localhost/${chain}-lcd`;
50-
const wsUrl = `ws://localhost/${chain}-rpc/websocket`;
48+
const rpcUrl = `http://127.0.0.1/${chain}-rpc`;
49+
const lcdUrl = `http://127.0.0.1/${chain}-lcd`;
50+
const wsUrl = `ws://127.0.0.1/${chain}-rpc/websocket`;
5151

5252
logger.log(`RPC server for ${chain} is started at ${rpcUrl}`);
5353
logger.log(`LCD server for ${chain} is started at ${lcdUrl}`);
@@ -75,7 +75,7 @@ export class DockerService {
7575

7676
logger.log("Starting traefik container...");
7777
await compose.upOne("traefik", config);
78-
logger.log("Traefik started at http://localhost:8080");
78+
logger.log("Traefik started at http://127.0.0.1:8080");
7979
}
8080

8181
async stopAll() {
@@ -122,7 +122,7 @@ export class DockerService {
122122
async waitForRpc(chain: CosmosChain, timeout = 120000): Promise<void> {
123123
const start = Date.now();
124124
const interval = 3000;
125-
const url = `http://localhost/${chain}-rpc/health`;
125+
const url = `http://127.0.0.1/${chain}-rpc/health`;
126126
let status = 0;
127127
while (Date.now() - start < timeout) {
128128
try {
@@ -144,7 +144,7 @@ export class DockerService {
144144
const testUrl = "cosmos/base/tendermint/v1beta1/node_info";
145145
const start = Date.now();
146146
const interval = 3000;
147-
const url = `http://localhost/${chain}-lcd/${testUrl}`;
147+
const url = `http://127.0.0.1/${chain}-lcd/${testUrl}`;
148148
let result, network;
149149
while (Date.now() - start < timeout) {
150150
try {

0 commit comments

Comments
 (0)