diff --git a/CHANGELOG.md b/CHANGELOG.md index d17f0206..cecb4022 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [0.13.10] - 2024-FEBRUARY-9 + +- Remove unused internal APIs +- Add Fraxtal testnet + ## [0.13.8] - 2023-DECEMBER-18 - Add `Immutable` to mainnet configs; update `Immutable` testnet RPC diff --git a/package.json b/package.json index 5470a68f..cfe04039 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@axelar-network/axelarjs-sdk", - "version": "0.13.9", + "version": "0.13.10", "description": "The JavaScript SDK for Axelar Network", "repository": { "type": "git", diff --git a/src/chains/supported-chains-list.ts b/src/chains/supported-chains-list.ts index f3ac63ee..7fdb378e 100644 --- a/src/chains/supported-chains-list.ts +++ b/src/chains/supported-chains-list.ts @@ -20,6 +20,7 @@ export const CHAINS = { FANTOM: "Fantom", FETCH: "fetch", FILECOIN: "filecoin-2", + FRAXTAL: "fraxtal", HAQQ: "haqq", HERO: "hero", HIGHRISE: "highrise", diff --git a/src/constants/EvmChain.ts b/src/constants/EvmChain.ts index 37c228d4..e2c45c4e 100644 --- a/src/constants/EvmChain.ts +++ b/src/constants/EvmChain.ts @@ -22,4 +22,5 @@ export enum EvmChain { IMMUTABLE = "immutable", CENTRIFUGE_TESTNET = "centrifuge-2", CENTRIFUGE = "centrifuge", + FRAXTAL = "fraxtal", } diff --git a/src/constants/GasToken.ts b/src/constants/GasToken.ts index 0d50e9d8..e036d9dc 100644 --- a/src/constants/GasToken.ts +++ b/src/constants/GasToken.ts @@ -27,6 +27,7 @@ export enum GasToken { SEPOLIA = "ETH", ARBITRUM_SEPOLIA = "ETH", CENTRIFUGE = "CFG", + FRAXTAL = "frxETH", } export const nativeGasTokenSymbol: Record> = { @@ -53,6 +54,7 @@ export const nativeGasTokenSymbol: Record undefined); - } else { - await this.saveGMP( - srcTxHash, - signerAddress, - srcTxInfo.transactionIndex, - srcTxInfo.logIndex, - "", - txResult.error - ).catch(() => undefined); - } - return txResult; } diff --git a/src/libs/TransactionRecoveryApi/constants/chain/testnet.ts b/src/libs/TransactionRecoveryApi/constants/chain/testnet.ts index 06b4b82f..d084e637 100644 --- a/src/libs/TransactionRecoveryApi/constants/chain/testnet.ts +++ b/src/libs/TransactionRecoveryApi/constants/chain/testnet.ts @@ -25,6 +25,7 @@ export const rpcMap: Record = { [EvmChain.ARBITRUM_SEPOLIA]: "https://sepolia-rollup.arbitrum.io/rpc", [EvmChain.CENTRIFUGE_TESTNET]: "https://node-7118620155331796992.gx.onfinality.io/jsonrpc?apikey=00538f2d-6297-44e3-8812-4b9d579524b2", + [EvmChain.FRAXTAL]: "https://rpc.testnet.frax.com", }; export const networkInfo: Record = { @@ -116,4 +117,8 @@ export const networkInfo: Record = { chainId: 13473, name: EvmChain.IMMUTABLE, }, + [EvmChain.FRAXTAL]: { + chainId: 2522, + name: EvmChain.FRAXTAL, + }, }; diff --git a/src/libs/test/TransactionRecoveryAPI/AxelarGMPRecoveryAPI.spec.ts b/src/libs/test/TransactionRecoveryAPI/AxelarGMPRecoveryAPI.spec.ts index c3b316cf..ac6e03bc 100644 --- a/src/libs/test/TransactionRecoveryAPI/AxelarGMPRecoveryAPI.spec.ts +++ b/src/libs/test/TransactionRecoveryAPI/AxelarGMPRecoveryAPI.spec.ts @@ -1525,23 +1525,11 @@ describe("AxelarGMPRecoveryAPI", () => { const error = new Error(ContractCallHelper.CALL_EXECUTE_ERROR.REVERT); vitest.spyOn(ContractCallHelper, "callExecute").mockRejectedValueOnce(error); - // Mock private saveGMP - const mockGMPApi = vitest.spyOn(AxelarGMPRecoveryAPI.prototype as any, "saveGMP"); - mockGMPApi.mockImplementation(() => Promise.resolve(undefined)); - const sourceTxHash = "0x86e5f91eff5a8a815e90449ca32e02781508f3b94620bbdf521f2ba07c41d9ae"; const response = await api.execute(sourceTxHash, undefined, evmWalletDetails); // Expect returns error expect(response).toEqual(ExecutionRevertedError(executeParams)); - - // Expect we don't call saveGMP api - expect(mockGMPApi).toHaveBeenCalledWith( - sourceTxHash, - new ethers.Wallet(evmWalletDetails.privateKey as string).address, - "", - response.error - ); }); test("it calls 'execute' and return revert error given 'callExecute' throws 'CALL_EXECUTE_ERROR.INSUFFICIENT_FUNDS' error", async () => { @@ -1557,23 +1545,11 @@ describe("AxelarGMPRecoveryAPI", () => { const error = new Error(ContractCallHelper.CALL_EXECUTE_ERROR.INSUFFICIENT_FUNDS); vitest.spyOn(ContractCallHelper, "callExecute").mockRejectedValueOnce(error); - // Mock private saveGMP - const mockGMPApi = vitest.spyOn(AxelarGMPRecoveryAPI.prototype as any, "saveGMP"); - mockGMPApi.mockImplementation(() => Promise.resolve(undefined)); - const sourceTxHash = "0x86e5f91eff5a8a815e90449ca32e02781508f3b94620bbdf521f2ba07c41d9ae"; const response = await api.execute(sourceTxHash, undefined, evmWalletDetails); // Expect returns error expect(response).toEqual(InsufficientFundsError(executeParams)); - - // Expect we don't call saveGMP api - expect(mockGMPApi).toHaveBeenCalledWith( - sourceTxHash, - new ethers.Wallet(evmWalletDetails.privateKey as string).address, - "", - response.error - ); }); test("it should call 'execute' and return success = true", async () => { @@ -1588,10 +1564,6 @@ describe("AxelarGMPRecoveryAPI", () => { // Mock contract call is successful vitest.spyOn(ContractCallHelper, "callExecute").mockResolvedValueOnce(contractReceiptStub()); - // Mock private saveGMP - const mockGMPApi = vitest.spyOn(AxelarGMPRecoveryAPI.prototype as any, "saveGMP"); - mockGMPApi.mockImplementation(() => Promise.resolve(undefined)); - const response = await api.execute( "0x86e5f91eff5a8a815e90449ca32e02781508f3b94620bbdf521f2ba07c41d9ae", undefined, @@ -1624,8 +1596,6 @@ describe("AxelarGMPRecoveryAPI", () => { }, }, }); - - expect(mockGMPApi).toHaveBeenCalledTimes(1); }); }); });