diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..dd84ea78 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..bbcbbe7d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/package.json b/package.json index 1eb8f7aa..88cfde6f 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "author": "Axelar Network", "license": "MIT", "dependencies": { - "@axelar-network/axelar-cgp-solidity": "^4.5.0", + "@axelar-network/axelar-cgp-solidity": "^6.3.0", "@axelar-network/axelarjs-types": "^0.33.0", "@cosmjs/json-rpc": "^0.30.1", "@cosmjs/stargate": "0.31.0-alpha.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2f838a98..7067b174 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,8 +6,8 @@ settings: dependencies: '@axelar-network/axelar-cgp-solidity': - specifier: ^4.5.0 - version: 4.5.0 + specifier: ^6.3.0 + version: 6.3.0 '@axelar-network/axelarjs-types': specifier: ^0.33.0 version: 0.33.0 @@ -165,6 +165,19 @@ packages: /@axelar-network/axelar-cgp-solidity@4.5.0: resolution: {integrity: sha512-4F4rmHei0cmzeUR7/mW4Bap5rc/KlPV2crD9HA7HTRfl15mVcN6/3z8p+pAm9We6bOrQplNW9KBZ3HJFP3C1Gw==} engines: {node: ^16.0.0 || ^18.0.0} + dev: true + + /@axelar-network/axelar-cgp-solidity@6.3.0: + resolution: {integrity: sha512-dHE2UgaFZvQvL0ythMi+aBsr4t+eR6zrVGmCU5BxslEqi6Tx+Wmjwg1O1p15EqoztalSqRKj+r57n3GtgeUpig==} + engines: {node: '>=18'} + dependencies: + '@axelar-network/axelar-gmp-sdk-solidity': 5.7.0 + dev: false + + /@axelar-network/axelar-gmp-sdk-solidity@5.7.0: + resolution: {integrity: sha512-JlokiWFxvR6bFQtDjdErtk0mZrr3GH1A8bKps1zVP/Bu4XOHR0WsrWGPVhWIbvT8a8Ag3dva4hskBYgdq+pLig==} + engines: {node: '>=18'} + dev: false /@axelar-network/axelar-local-dev@1.0.2: resolution: {integrity: sha512-sb+8gLNF/xMztN2m05mm8Rh1hpG298DPOqEtOZsQz0LTbhzFe/yKoIgOuO++0G9w5o4u/skTQA1SOSpMWC0M/w==} diff --git a/src/constants/index.ts b/src/constants/index.ts index 1a1bac33..9e02a781 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -39,7 +39,7 @@ const devnetConfigs: EnvironmentConfigs = { }; const testnetConfigs: EnvironmentConfigs = { resourceUrl: "https://nest-server-testnet.axelar.dev", - axelarRpcUrl: "https://rpc-axelar-testnet.imperator.co:443", // "https://testnet.rpc.axelar.dev/chain/axelar", + axelarRpcUrl: "https://testnet.rpc.axelar.dev/chain/axelar", axelarLcdUrl: "https://lcd-axelar-testnet.imperator.co", depositServiceUrl: "https://deposit-service.testnet.axelar.dev", axelarGMPApiUrl: "https://testnet.api.gmp.axelarscan.io", diff --git a/src/libs/AxelarQueryAPI.ts b/src/libs/AxelarQueryAPI.ts index 59dd1beb..b5194ab4 100644 --- a/src/libs/AxelarQueryAPI.ts +++ b/src/libs/AxelarQueryAPI.ts @@ -279,7 +279,7 @@ export class AxelarQueryAPI { public async calculateL1FeeForDestL2( destChainId: EvmChain | string, destToken: FeeToken, - executeData: `0x${string}` | undefined, + executeData: string | undefined, sourceToken: FeeToken, ethereumToken: BaseFeeResponse["ethereumToken"], actualGasMultiplier: number, @@ -327,7 +327,7 @@ export class AxelarQueryAPI { * Calculate estimated gas amount to pay for the gas receiver contract. * @param sourceChainId Can be of the EvmChain enum or string. If string, should try to generalize to use the CHAINS constants (e.g. CHAINS.MAINNET.ETHEREUM) * @param destinationChainId Can be of the EvmChain enum or string. If string, should try to generalize to use the CHAINS constants (e.g. CHAINS.MAINNET.ETHEREUM) - * @param gasLimit An estimated gas amount required to execute `executeWithToken` function. + * @param gasLimit An estimated gas amount required to execute the transaction at the destination chain. For destinations on OP Stack chains (Optimism, Base, Scroll, Fraxtal, Blast, etc.), set only the L2 gas limit. The endpoint will automatically handle L1 gas estimation and bundling. * @param gasMultiplier (Optional) A multiplier used to create a buffer above the calculated gas fee, to account for potential slippage throughout tx execution, e.g. 1.1 = 10% buffer. supports up to 3 decimal places * The default value is "auto", which uses the gas multiplier from the fee response * @param sourceChainTokenSymbol (Optional) the gas token symbol on the source chain. @@ -343,7 +343,7 @@ export class AxelarQueryAPI { gasMultiplier: number | "auto" = "auto", sourceChainTokenSymbol?: GasToken | string, minGasPrice = "0", - executeData?: `0x${string}`, + executeData?: string, gmpParams?: GMPParams ): Promise { await throwIfInvalidChainIds([sourceChainId, destinationChainId], this.environment); diff --git a/src/libs/types/index.ts b/src/libs/types/index.ts index 61df917c..d1ee94da 100644 --- a/src/libs/types/index.ts +++ b/src/libs/types/index.ts @@ -245,7 +245,7 @@ export type TokenUnit = { }; export type EstimateL1FeeParams = { - executeData: `0x${string}`; + executeData: string; l1GasPrice: TokenUnit; destChain: string; l1GasOracleAddress?: string | undefined;