Skip to content

Commit

Permalink
Feat/intergrate dynamic token (#356)
Browse files Browse the repository at this point in the history
* pump common beta & oraiswap-v3

* fix: update branch in workflow

* pump common

* pump common

* pump common

* feat: add oraidex json

* chore: add test

* init load tokens

* feat: add token Config

* feat: add token Config

* fix: update common

* fix: update common

* fix: update common

* fix: test

* fix: update @oraichain/common to version 1.1.3 and clean up imports

* fix: update TypeScript module setting from es2020 to esnext in tsconfig.test.json

* fix: update dependencies and adjust TypeScript configurations

* fix: build token

* fix: update sdk common

* fix: refactor token initialization and filtering logic in initOraiCommon

* fix: update sdk

* fix: common reader

* fix: get list token suppoted json

* Feat/add htt token (#358)

* feat: add HTT token configuration to oraidex.json

* fix: update HTT token denomination format in oraidex.json

* fix: update HTT token coingecko_id in oraidex.json

* fix: rm htt token

* feat: add htt (#359)

* chore: bump version common

* chore: bump version universal swap

* chore: bump common version

* fix: update version common in universal swap

* fix: update package

* fix: update call api supported token

* fix: format bridge to

* fix: update token suported

* fix: update version common

* fix: update common version

* chore: bump version commom

* chore: bump version commom

* chore: bump version commom

* chore: update version 1.2.0

* fix: update version common

* fix: update common sdk version

* chore: update verions

* refactor: remove module type and update tsconfig settings across packages

* chore: update @oraichain/common to version 1.2.1-beta3 and refactor token service

* add example

* fix: network.ts

* feat: bump version of @oraichain/oraidex-common to 2.0.0 and update dependencies

* feat: update @oraichain/oraidex-common to version 2.0.0 and adjust dependencies

* fix: make Icon property optional in TokenItemType

* fix: allow additional CoinGeckoId values by adding string type

* feat: initialize OraidexCommon in demo files and update tsconfig to exclude build directory

* feat: integrate OraidexCommon into demo files for enhanced functionality

* fix: handle errors in alphaSwapToOraichain function and improve logging

* feat: enhance address validation by integrating CustomChainInfo and updating checkValidateAddressWithNetwork logic

* feat: refactor asset parsing and validation logic in OraidexCommon to ensure OraidexCommon is loaded before processing

* feat: enhance OraidexCommon integration by adding getOraidexCommonAttribute and updating asset parsing logic

* feat: refactor getTokenOnOraichain usage and improve address validation structure

* chore: update @oraichain/common dependency to version ^1.2.1-beta5

* chore: update @oraichain/common dependency to version 1.2.1-beta5

* chore: update @oraichain/common dependency to version ^1.2.1-beta6

* feat: add flattenTokens support in OraidexCommon and update related logic

* feat: update @oraichain/oraidex-common to version 2.0.0-beta.1 and adjust dependencies in related packages

* chore: update @oraichain/cw-simulate to version ^2.8.108 and adjust dependencies in ibc-routing package

* feat: update package versions to 1.2.0-beta1 and integrate new workflow for universal-swap publishing

* feat: bump version to 1.2.0-beta2 and update TypeScript configuration to include JavaScript files

* feat: bump version to 2.0.0-beta.2 and enhance getOraidexCommonAttribute with additional keys

* feat: bump versions for oraiswap-v3 to 1.1.3-beta.1 and universal-swap to 1.1.24-beta.1

* feat: bump version to 1.2.0-beta3 and implement token filtering functions in swap-filter

* feat: bump version to 2.0.0-beta.3 and add staking_oraix and indexer_v3 to NetworkConfig

* feat: add mixer_router to OraidexCommon and update yarn.lock for oraidex-common@2.0.0-beta.2

* feat: bump version to 1.2.0-beta4 and update oraidex-common dependency to 2.0.0-beta.3

* feat: bump version to 2.0.0-beta.4 and update dependencies in multiple packages

* feat: bump version to 1.2.0-beta5 for oraiswap-v3 and universal-swap packages

* feat: bump version to 2.0.0-beta.6 and update dependencies across packages

* feat: bump versions to 2.0.0-beta.7 and 1.2.1-beta7 across packages

* feat: bump versions to 2.0.0-beta.8 and 1.2.0-beta.8 across packages

* feat: bump versions to 2.0.0-beta.9 and 1.2.0-beta.9 across packages

* feat: bump versions to 2.0.0-beta.10 and 1.2.0-beta.10 across packages; refactor imports and remove unused code

* feat: bump versions to 2.0.0-beta.11 and 1.2.0-beta.11 across packages; update dependencies

* feat: add ORAIBTC and oBTC configurations to oraidex.json for mainnet support

* feat: add ORAIBTC and oBTC configurations for oraibtc-mainnet-1 in oraidex.json

* feat: update version to 2.0.0-beta.12; add btcTokens getter and bitcoin configuration in oraidex.json

* feat: bump version to 1.2.0-beta.12 in oraiswap-v3 and universal-swap; update oraidex-common dependency

* feat: bump version to 2.0.0-beta.13 for oraidex-common, oraiswap-v3, and universal-swap; add Celestia and Neutaro icons

* fix: update workflow branch name from feat/intergrate_common_v1 to feat/intergrate_common

* feat: bump versions to 2.0.0-beta.14 for oraidex-common and 1.2.0-beta.14 for oraiswap-v3 and universal-swap; add btcChains getter in oraidex-common

* feat: bump versions to 2.0.0-beta.15 for oraidex-common and 1.2.0-beta.15 for oraiswap-v3 and universal-swap; update icon URLs and enhance address validation

* chore: comment out Oraiswap v3 and Universal-swap publish steps in workflow

* fix: update build command to specify package directory for Oraidex Common

* fix: update build command in workflow and restore publish steps for Oraiswap v3 and Universal-swap; bump oraidex-common version to 2.0.0-beta.15

* bump version to 2.0.0-beta.16 in package.json

* add Solana configuration for MAX and ORAI tokens in oraidex.json

* bump version to 2.0.0-beta.17 and add solTokens getter in OraidexCommon class

* add HTT token configuration to oraidex.json (#378)

* add THT token configuration to oraidex.json

* remove THT token configuration from oraidex.json

* remove HTT token configuration from oraidex.json

* add THT token configuration to oraidex.json (#379)

* bump package versions for oraidex-common, oraiswap-v3, and universal-swap to beta.19

* update ibcInfos type definition to allow any value and bump oraidex-common package version to beta.12

* bump package versions for oraidex-common, oraiswap-v3, and universal-swap to beta.20 and add extended token items functionality

* bump package versions for oraidex-common, oraiswap-v3, and universal-swap to beta.21 and update addExtendedTokenItemsOnChain method to use BridgeAppCurrency type

* bump package versions for oraidex-common, oraiswap-v3, and universal-swap to beta.22 and update dependency for @oraichain/common to beta.13

* remove hardcode list pairs

* remove commented-out getOraidexCommonAttribute function and related tokenMap references in helper.ts

* add Ton and TonTestnet support in wallet interface, update NetworkType, and enhance universal swap functionality

* fix oraidex common

* bump version to 2.0.0-beta.23 in package.json

* bump version to 2.0.0-beta.24 and add tonTokens and tonNetworkMainnet getters

* refactor: update build command for oraidex-common and comment out unused publish steps

* refactor: update build command in workflow and bump version for oraiswap-v3 and universal-swap packages

* bump version to 1.2.0-beta.24 and update router API to staging environment

* bump version to 2.0.0-beta.25 and add ton configuration to oraidex.json

* refactor: update build and publish process for oraidex-common package

* chore: update oraidex-common and common package versions to stable releases

* chore: update @oraichain/common package version to 1.2.6 and enable publishing for Oraiswap and Universal-swap

* chore: update version of @oraichain/oraidex-common to 2.0.0-beta

* chore: update oraidex-common to version 2.0.1 and @oraichain/common to version 1.2.7; adjust build process in CI workflow

* chore: bump version to 2.0.2 and update toAmount function for improved precision

* chore: update oraiswap and universal-swap package versions to 1.2.0-beta25 and oraidex-common to 2.0.2; adjust CI workflow for publishing

* chore: bump oraidex-common version to 2.0.3 and improve toAmount function with validated input

* chore: bump oraidex-common version to 2.0.4 and enhance toDisplay function for improved precision and validation

* update simulate amount

* chore: update package versions for oraiswap-v3 and universal-swap to 1.2.0-beta26 and 1.2.0-beta27, respectively, and bump oraidex-common to 2.0.5

* fix simulate new token

* chore: update package versions to 1.3.0 for oraiswap-v3 and universal-swap, and switch router API to production

* chore: bump version to 2.0.6 and update backend URL for OraidexCommon initialization

---------

Co-authored-by: vuonghuuhung <vuonghuuhung2002@gmail.com>
Co-authored-by: Hau Nguyen Van <nguyenvanhauit1997@gmail.com>
Co-authored-by: trungbach <trunga2k29@gmail.com>
Co-authored-by: Trung Bạch <66735837+trungbach@users.noreply.github.com>
Co-authored-by: Vương Hữu Hưng <92346765+vuonghuuhung@users.noreply.github.com>
  • Loading branch information
6 people authored Dec 31, 2024
1 parent a19ff69 commit 3ec3dfa
Show file tree
Hide file tree
Showing 71 changed files with 2,487 additions and 2,877 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/publish_package_common_v3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: publish_package_universal_common

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [feat/intergrate_common]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: ["18"]

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.8.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
# - name: Get yarn cache directory path
# id: yarn-cache-dir-path
# run: echo "::set-output name=dir::$(yarn cache dir)"
# - uses: actions/cache@v4
# id: yarn-cache
# with:
# path: |
# ${{ steps.yarn-cache-dir-path.outputs.dir }}
# ./node_modules/
# key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}-yarn-
- name: Install Dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- name: Build
run: yarn build
- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish Oraidex Common
id: publish-common
continue-on-error: true
run: yarn deploy packages/oraidex-common
env:
CI: false
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish Oraiswap v3
id: publish-oraiswap-v3
continue-on-error: true
run: yarn deploy:beta packages/oraiswap-v3
env:
CI: false
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish Universal-swap
id: publish-universal-swap
continue-on-error: true
run: yarn deploy:beta packages/universal-swap
env:
CI: false
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"devDependencies": {
"@babel/traverse": "7.24.1",
"@cosmjs/encoding": "^0.32.4",
"@oraichain/cw-simulate": "^2.8.68",
"@oraichain/cw-simulate": "^2.8.108",
"@swc/core": "^1.4.11",
"@swc/jest": "^0.2.36",
"@types/jest": "^29.5.12",
Expand Down
6 changes: 3 additions & 3 deletions packages/ibc-routing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"license": "MIT",
"dependencies": {
"@duckdb/duckdb-wasm": "^1.27.1-dev125.0",
"@oraichain/oraidex-common": "^1.0.10",
"@oraichain/oraidex-contracts-sdk": "^1.0.24",
"@oraichain/oraidex-universal-swap": "1.0.14",
"@oraichain/oraidex-common": "^1.1.34",
"@oraichain/oraidex-contracts-sdk": "^1.0.56",
"@oraichain/oraidex-universal-swap": "^1.1.23",
"@xstate/inspect": "^0.8.0",
"bech32": "1.1.4",
"ethers": "^5.5.1",
Expand Down
13 changes: 7 additions & 6 deletions packages/oraidex-common/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"name": "@oraichain/oraidex-common",
"version": "1.1.44",
"main": "build/index.js",
"version": "2.0.6",
"main": "./build/index.js",
"module": "./build/index.js",
"types": "./build/index.d.ts",
"files": [
"build/"
"./build/"
],
"scripts": {
"build": "tsc -p tsconfig.json",
Expand All @@ -27,11 +29,10 @@
"@oraichain/oraidex-contracts-sdk": "latest",
"@injectivelabs/sdk-ts": "1.12.1",
"tronweb": "6.0.0-beta.4",
"@oraichain/common": "1.2.7",
"@ton/core": "0.56.3",
"@ton/crypto": "3.3.0",
"@ton/ton": "14.0.0"
"@ton/crypto": "3.3.0"
},
"devDependencies": {},
"resolutions": {
"bech32": "1.1.4"
}
Expand Down
112 changes: 0 additions & 112 deletions packages/oraidex-common/src/alpha-network.ts

This file was deleted.

54 changes: 0 additions & 54 deletions packages/oraidex-common/src/celestia-network.ts

This file was deleted.

Loading

0 comments on commit 3ec3dfa

Please sign in to comment.