Skip to content

Commit

Permalink
v0.12.0 (#229)
Browse files Browse the repository at this point in the history
* Fix nativeAddGas api doesn't detect gas unpaid correctly (#193)

* fix: validate contract event args

* chore: fix amount compare

* test: add tests for `contractEventHelper`

* chore: remove unused import

* test: fix failed tests

* chore: fix lint

* chore: remove all return await

* chore: update rpc & lcd uri (#199)

* feat: update deposit service integration into getDepositAddress metho… (#196)

* feat: update deposit service integration into getDepositAddress method with new object param

* chore: incorporating vlad comments

* Chain ids (#202)

* feat: initial commit for refactor of all methods to use chainId

* chore: wip

* chore: code cleanup

* 0.12.0-alpha

* feat: adding 0.12.0 changelogs (#204)

* feat: adding 0.12.0 changelogs

* chore: update changelog for axelarjs-types

* chore: update changelog

Co-authored-by: vladwulf <[email protected]>

* Fix cannot find chain `ethereum-2` (#206)

* fix: cannot find chain name 'ethereum-2'

* fix: lint

* chore: fix lint

* chore: remove as EvmChain as the function signature is string

* chore: fix lint

* chore/fix undefined assets (#207)

chore: fix undefined assetInfo

* chore: updating axelarjs-types to v0.27.0 (#205)

* Small fixes (#203)

* chore: adding refundAddress and shouldUnwrapIntoNative into dto

* chore: adding some fixes

* 0.12.0-alpha.1

* chore: fix test

* Implement getActiveChains query and more (#210)

* feat: add query for getActiveChains

* chore: implement tests for AxelarQueryAPI

* chore: remove isValidChainIdentifier in private function

* chore: map to lowercase before returning

* feat: add a function to throw if the chain is inactive

* chore: rename isValidChainIdentifier -> throwIfInvalidChainId

* chore: improve tests performance

* feat: add throwIfInactiveChain function for AxelarAssetTransfer

* chore: Add jest mock for AxelarAssetTransfer tests to prevent real network calls

* chore: removed throwIfInactiveChain in calculateGasFee and calculateNativeGasFee because it already exist in subtractGas function

* chore: remove lowercase

* Update CHANGELOG.md

Co-authored-by: Canh Trinh <[email protected]>

* Add chainId suggestion for getTransferFee and more (#211)

* feat: refactor duplicated validateChainIdentifiers function

* feat: improves perf for chains validation

* chore: update function calls due to function signature changed

* chore: fix tests

* feat: fixed getTransferFee doesn't check for chainId

* chore: fix tests

* chore: fix lint

* chore: use constant

* fix integration tests (#212)

chore: fix integration tests

* Fix/native denom bug (#213)

* fix: getERC20Denom should correctly use chainId

* chore: tsconfig should include global types

* clean: unused await

* fix: possible nullable bug

* 0.12.0-alpha.2

* fix: tests

* Change the default refund address (#217)

* chore: refactor getGasReceiverContractAddress by removing duplicated functions and move to AxelarQueryAPI

* chore: throw if invalid chain id

* chore: refactor `getGasReceiverContractAddress` to `getContractAddressFromConfig`

* feat: change the default refundAddress to `default_refund_collector` from config

* chore: fix tests

* feat: add instruction about valid contractKey

* chore: fix wrong contractkey

* Add `timeSpent` for `queryTransactionStatus` API (#218)

* feat: add `timeSpent`

* test: add e2e tests for timeSpent

* chore: cleanup unnecessary function

* chore: update changelog

* chore: revert GMPStatus except the addition values

* 0.12.0-alpha.3

* chore: using chain id for getContractAddressFromConfig

* 0.12.0-alpha.4

* Adding missing EVMChain and config values (#221)

* chore: add-missing-evm-chains

* update chains.ts

* capitalise kava

Co-authored-by: vladwulf <[email protected]>

* 0.12.0-alpha.5

* chore: change rpc url for mainnet to worker

* 0.12.0-alpha.6

* chore: params for in validateOfflineDepositAddress for unwrap case

* 0.12.0-alpha-7

* chore: changing refund address default for unwrap

* 0.12.0-alpha-8

* chore: fix test

* feat: adding query for token limit on evm chains (#225)

* feat: adding query for token limit on evm chains

chore: codefix and fixing tests

* chore: update getTransferLimit based on new min logic

* chore: updating PR to take simple min of limits

* chore: code cleanup

* chore: code cleanup

* chore: dealing with overflow

* 0.12.0-alpha.10

* chore: refactor token mint limit

* 0.12.0-alpha.11

* chore: code cleanup

* 0.12.0-alpha.12

* chore: convert native token to erc in axelar query (#226)

* chore: convert native token to erc in axelar query

* chore: deleting duplicate asset check

* chore: move convertAssetDenom call out of try/catch block

* 0.12.0-alpha.13

* chore: update alpha version

Co-authored-by: npty <[email protected]>

* chore(deps): bump json5 from 1.0.1 to 1.0.2 (#228)

Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](json5/json5@v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Canh Trinh <[email protected]>

* 0.12.0-alpha.15

* cleanup changelog

* chore: update rpc/lcd configs

* fix: osmosis chain id

* 0.12.0

* chore: fix test

* lint: fix

* lint: fix

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: npty <[email protected]>
Co-authored-by: Vladimir Agaev <[email protected]>
Co-authored-by: npty <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
5 people authored Jan 18, 2023
1 parent 9d9382e commit 82a8e84
Show file tree
Hide file tree
Showing 46 changed files with 1,269 additions and 328 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@ 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.12.0] - 2023-JANUARY-17

- changed all method signatures to require chain IDs (as recognized by Axelar) instead of chain name. For example, in testnet, Ethereums (Goerli) is recognized as `ethereum-2`
- added a chainId suggestion when passing wrong chainId e.g. chain name in `getTransferFee` api.
- AxelarQueryAPI
- added a query to retrieve all active chains on the network (`getActiveChain`) and updates all method implementations to ensure that invocations are only made to live chains
- added `timeSpent` field to the `queryTransactionStatus` API.
- added more possible values for `GMPStatus` enum.
- added `getTransferLimit` query to retrieve the maximum transfer for an asset on a chain
- `getDepositAddress` updates:
1. update payload signature to accept a destructured object parameter. the method is still backwards compatible for previous invocations using regular parameters
2. merged `getDepositAddressForNativeUnwrap` and `getDepositAddressForNativeWrap` method functionality into `getDepositAddress` method
- upgrade axelarjs-types dependency to `v0.27.0`
- update default axelar rpc & lcd endpoints in testnet/mainnet from quickapi to imperator
- fix [native gas estimates](https://github.com/axelarnetwork/axelarjs-sdk/pull/193)

## [0.11.7] - 2022-OCTOBER-26

- updated supported chains list
Expand Down
20 changes: 11 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@axelar-network/axelarjs-sdk",
"version": "0.11.7",
"version": "0.12.0",
"description": "The JavaScript SDK for Axelar Network",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
Expand Down Expand Up @@ -36,7 +36,7 @@
"license": "MIT",
"dependencies": {
"@axelar-network/axelar-cgp-solidity": "^4.3.0",
"@axelar-network/axelarjs-types": "^0.24.0",
"@axelar-network/axelarjs-types": "^0.27.0",
"@cosmjs/stargate": "^0.28.4",
"@types/uuid": "^8.3.1",
"bech32": "^2.0.0",
Expand Down
3 changes: 3 additions & 0 deletions src/assets/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ export interface AssetInfoForChain extends AssetInfo {
}

export interface AssetConfig {
id: string;
common_key: { [env: string]: string };
native_chain: string;
fully_supported: boolean;
decimals: number;
chain_aliases: { [key: string]: AssetInfoForChain };
wrapped_erc20: string;
is_gas_token: boolean;
}

export type LoadAssetConfig = {
Expand Down
2 changes: 1 addition & 1 deletion src/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { loadAssets } from "../assets";
import { AssetConfig, AssetInfo } from "../assets/types";
import { ChainInfo, LoadChainConfig } from "./types";
import cloneDeep from "clone-deep";
import { Environment } from "src/libs";
import { Environment } from "../libs";

export async function loadChains(config: LoadChainConfig) {
const allAssets = await loadAssets(config);
Expand Down
8 changes: 7 additions & 1 deletion src/chains/supported-chains-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const CHAINS = {
EVMOS: "evmos",
FETCH: "fetch",
KUJIRA: "kujira",
OSMOSIS: "osmosis-4",
OSMOSIS: "osmosis-5",
SEI: "sei",
AURORA: "aurora",
AVALANCHE: "Avalanche",
Expand All @@ -16,6 +16,9 @@ export const CHAINS = {
MOONBEAM: "Moonbeam",
POLYGON: "Polygon",
TERRA: "terra-3",
ARBITRUM: "arbitrum",
CELO: "celo",
KAVA: "kava",
},
MAINNET: {
ASSETMANTLE: "assetmantle",
Expand Down Expand Up @@ -43,5 +46,8 @@ export const CHAINS = {
EMONEY: "e-money",
AGORIC: "agoric",
UMEEE: "umee",
ARBITRUM: "arbitrum",
CELO: "celo",
KAVA: "kava",
},
};
4 changes: 3 additions & 1 deletion src/chains/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export interface AssetAndChainInfo {
}

export interface ChainInfo {
assets?: AssetInfo[];
id: string;
assets: AssetInfo[];
chainSymbol: string;
chainName: string;
fullySupported: boolean;
Expand All @@ -28,6 +29,7 @@ export interface ChainInfo {
testnet: string;
mainnet: string;
};
nativeAsset: string[];
addressPrefix: string;
}

Expand Down
8 changes: 4 additions & 4 deletions src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ const devnetConfigs: EnvironmentConfigs = {
};
const testnetConfigs: EnvironmentConfigs = {
resourceUrl: `https://nest-server-testnet.axelar.dev`,
axelarRpcUrl: "https://axelar-testnet-rpc.axelar-dev.workers.dev",
axelarLcdUrl: "https://axelar-testnet-lcd.axelar-dev.workers.dev",
axelarRpcUrl: "https://testnet.rpc.axelar.dev/chain/axelar",
axelarLcdUrl: "https://rpc-axelar-testnet.imperator.co",
depositServiceUrl: "https://deposit-service.testnet.axelar.dev",
axelarGMPApiUrl: "https://testnet.api.gmp.axelarscan.io",
recoveryApiUrl: "https://axelar-signing-relayer-testnet.axelar.dev",
Expand All @@ -43,8 +43,8 @@ const testnetConfigs: EnvironmentConfigs = {
};
const mainnetConfigs: EnvironmentConfigs = {
resourceUrl: `https://nest-server-mainnet.axelar.dev`,
axelarRpcUrl: "https://axelar-rpc.quickapi.com",
axelarLcdUrl: "https://axelar-lcd.quickapi.com",
axelarRpcUrl: "https://mainnet.rpc.axelar.dev/chain/axelar",
axelarLcdUrl: "https://lcd-axelar.imperator.co",
axelarGMPApiUrl: "https://api.gmp.axelarscan.io",
depositServiceUrl: "https://deposit-service.mainnet.axelar.dev",
recoveryApiUrl: "https://axelar-signing-relayer-mainnet.axelar.dev",
Expand Down
Loading

0 comments on commit 82a8e84

Please sign in to comment.