Skip to content

Commit

Permalink
testnet version 0.3.19 (#411)
Browse files Browse the repository at this point in the history
Co-authored-by: npty <[email protected]>
Co-authored-by: Santiago Giaccobasso <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
5 people authored Jul 23, 2024
1 parent 63c76b5 commit d2a9877
Show file tree
Hide file tree
Showing 14 changed files with 249 additions and 22 deletions.
12 changes: 12 additions & 0 deletions apps/maestro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @axelarjs/maestro

## 0.3.19

### Patch Changes

- [#410](https://github.com/axelarnetwork/axelarjs/pull/410) [`775cc3c563d3b0c74b4c015fcaa50dcad974a0e3`](https://github.com/axelarnetwork/axelarjs/commit/775cc3c563d3b0c74b4c015fcaa50dcad974a0e3) Thanks [@SGiaccobasso](https://github.com/SGiaccobasso)! - Added Immutable chain support to both testnet and mainnet.

- [#409](https://github.com/axelarnetwork/axelarjs/pull/409) [`8480aa6b0d744cd13528117f934498d6576624ee`](https://github.com/axelarnetwork/axelarjs/commit/8480aa6b0d744cd13528117f934498d6576624ee) Thanks [@SGiaccobasso](https://github.com/SGiaccobasso)! - Added cookie consent banner to interchain.axelar.dev

- Updated dependencies [[`e15a2ca45e3dd2148e103dced4e2dee94b65eae8`](https://github.com/axelarnetwork/axelarjs/commit/e15a2ca45e3dd2148e103dced4e2dee94b65eae8)]:
- @axelarjs/api@0.4.5
- @axelarjs/evm@0.2.5

## 0.3.18

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/maestro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@axelarjs/maestro",
"version": "0.3.18",
"version": "0.3.19",
"private": true,
"publishConfig": {
"access": "restricted"
Expand Down
Binary file added apps/maestro/public/logos/chains/immutable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions apps/maestro/public/logos/chains/immutable.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions apps/maestro/src/config/evm-chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import {
filecoinCalibration,
fraxtal,
fraxtalTestnet,
immutableZkEvm,
immutableZkEvmTestnet,
kava,
kavaTestnet,
linea,
Expand Down Expand Up @@ -90,6 +92,18 @@ export const ALL_CHAINS: ExtendedWagmiChainConfig[] = [
axelarChainName: "Fantom",
environment: ENVIRONMENTS.testnet,
},
{
...immutableZkEvm,
axelarChainId: "immutable",
axelarChainName: "Immutable",
environment: ENVIRONMENTS.mainnet,
},
{
...immutableZkEvmTestnet,
axelarChainId: "immutable",
axelarChainName: "Immutable",
environment: ENVIRONMENTS.testnet,
},
{
...avalanche,
axelarChainId: "avalanche",
Expand Down
7 changes: 7 additions & 0 deletions apps/maestro/src/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ export default function Document() {
return (
<Html lang="en" data-theme="light" className="scroll-smooth">
<Head>
{/* Cookies banner code */}
<script
async
type="text/javascript"
src="//cdn.cookie-script.com/s/1dbb8c364e74a2d20f8ba281fb204aa4.js"
/>
{/* End cookies banner code */}
{/* Twitter conversion tracking base code */}
<script
dangerouslySetInnerHTML={{
Expand Down
6 changes: 6 additions & 0 deletions packages/api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @axelarjs/api

## 0.4.5

### Patch Changes

- [#407](https://github.com/axelarnetwork/axelarjs/pull/407) [`e15a2ca45e3dd2148e103dced4e2dee94b65eae8`](https://github.com/axelarnetwork/axelarjs/commit/e15a2ca45e3dd2148e103dced4e2dee94b65eae8) Thanks [@npty](https://github.com/npty)! - Added `getSymbolFromDenom` and `getDenomFromSymbol` functions

## 0.4.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@axelarjs/api",
"version": "0.4.4",
"version": "0.4.5",
"publishConfig": {
"access": "public"
},
Expand Down
58 changes: 58 additions & 0 deletions packages/api/src/axelar-query/client.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,62 @@ describe("axelar-query (node client)", () => {
expect(res.baseFee).toBeTruthy();
});
});

describe("getDenomFromSymbol", () => {
test("should return the correct denom for a given symbol", async () => {
const api = createAxelarQueryClient(ENVIRONMENTS.mainnet);
const denom = await api.getDenomFromSymbol("USDC", "ethereum");
expect(denom).toBe("uusdc");
});

test("cache should work properly", async () => {
const api = createAxelarQueryClient(ENVIRONMENTS.mainnet);
await api.getDenomFromSymbol("USDC", "ethereum");
expect(api["cachedChainConfig"]).toBeDefined();
});

test("should throw error if symbol is not found", async () => {
const api = createAxelarQueryClient(ENVIRONMENTS.mainnet);

await expect(async () => {
await api.getDenomFromSymbol("!@#$", "avalanche");
}).rejects.toThrow();
});

test("should throw error if chain is not found", async () => {
const api = createAxelarQueryClient(ENVIRONMENTS.mainnet);
await expect(async () => {
await api.getDenomFromSymbol("USDC", "!@#$");
}).rejects.toThrow();
});
});

describe("getSymbolFromDenom", () => {
test("should return the correct denom for a given symbol", async () => {
const api = createAxelarQueryClient(ENVIRONMENTS.mainnet);
const denom = await api.getSymbolFromDenom("uusdc", "ethereum");
expect(denom).toBe("USDC");
});

test("cache should work properly", async () => {
const api = createAxelarQueryClient(ENVIRONMENTS.mainnet);
await api.getSymbolFromDenom("uusdc", "ethereum");
expect(api["cachedChainConfig"]).toBeDefined();
});

test("should throw error if symbol is not found", async () => {
const api = createAxelarQueryClient(ENVIRONMENTS.mainnet);

await expect(async () => {
await api.getSymbolFromDenom("!@#$", "avalanche");
}).rejects.toThrow();
});

test("should throw error if chain is not found", async () => {
const api = createAxelarQueryClient(ENVIRONMENTS.mainnet);
await expect(async () => {
await api.getSymbolFromDenom("uusdc", "!@#$");
}).rejects.toThrow();
});
});
});
2 changes: 2 additions & 0 deletions packages/api/src/axelar-query/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
type HttpClientOptions,
} from "@axelarjs/utils/http-client";

import { createAxelarConfigClient } from "../axelar-config";
import { createAxelarscanClient } from "../axelarscan";
import { createGMPClient } from "../gmp/client";
import { AxelarQueryAPIClient } from "./isomorphic";
Expand All @@ -19,6 +20,7 @@ export const createAxelarQueryClient = (
{
gmpClient: createGMPClient(env),
axelarscanClient: createAxelarscanClient(env),
axelarConfigClient: createAxelarConfigClient(env),
},
env
);
37 changes: 29 additions & 8 deletions packages/api/src/axelar-query/fee/getL1Fee.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ describe("getL1Fee", () => {
});

it("query arbitrum l1 fee should work", async () => {
const destinationChain = "arbitrum";
const config = configs.evm.find((c) => c.id === destinationChain);
const fees = await client.getFees({
sourceChain: "avalanche",
destinationChain: "arbitrum",
destinationChain,
});

const params: EstimateL1FeeParams = {
Expand All @@ -31,17 +33,24 @@ describe("getL1Fee", () => {
l1GasPrice: fees.destination_native_token.l1_gas_price_in_units!,
};

const rpcUrl = configs.evm.find((chain) => chain.id === "arbitrum")
?.endpoints.rpc?.[0];
let success = false;
for (const rpc of config?.endpoints.rpc || []) {
try {
const fee = await getL1FeeForL2(rpc, params);
expect(fee).toBeDefined();
success = true;
break;
} catch (e) {
// retry with next rpc
}
}

const fee = await getL1FeeForL2(rpcUrl!, params);
expect(fee).toBeDefined();
expect(success).toBe(true);
});

it("query optimism l1 fee should work", async () => {
const destChain = "optimism";
const config = configs.evm.find((c) => c.id === destChain);
const rpcUrl = config?.endpoints.rpc[0];
const fees = await client.getFees({
sourceChain: "avalanche",
destinationChain: destChain,
Expand All @@ -56,8 +65,20 @@ describe("getL1Fee", () => {
l2Type: "op",
};

const fee = await getL1FeeForL2(rpcUrl!, params);
expect(fee).toBeGreaterThan(0n);
let success = false;

for (const rpc of config?.endpoints.rpc || []) {
try {
const fee = await getL1FeeForL2(rpc, params);
expect(fee).toBeGreaterThan(0n);
success = true;
break;
} catch (e) {
// retry with next rpc
}
}

expect(success).toBe(true);
});

it("query mantle l1 fee should work", async () => {
Expand Down
Loading

0 comments on commit d2a9877

Please sign in to comment.