-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/support swap oraidex osmosis #343
Changes from all commits
9025ed8
def2bd1
34e0ebb
7172104
f45d930
967e5e0
9d5ed54
91da451
42bdc06
40e9135
fa54662
8e2e16f
a43efd7
c7c622f
14883e4
3e7112c
bfba1b8
267ffcf
09ad0e0
10dfe29
7badad2
5a9a9dc
8ccebb3
43fca1f
9b516c6
e09ac6e
1e23583
1ad1cb6
db5622b
a438bc6
34ce351
00ab354
d6bca87
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,4 +38,6 @@ coverage | |
.nx/cache | ||
.nx/workspace-data | ||
|
||
.yarn | ||
.yarn | ||
|
||
demo-local |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { CustomChainInfo, defaultBech32Config } from "./network"; | ||
|
||
export const celestiaNetwork: CustomChainInfo = { | ||
bech32Config: { | ||
bech32PrefixAccAddr: "celestia", | ||
bech32PrefixAccPub: "celestiapub", | ||
bech32PrefixConsAddr: "celestiavalcons", | ||
bech32PrefixConsPub: "celestiavalconspub", | ||
bech32PrefixValAddr: "celestiavaloper", | ||
bech32PrefixValPub: "celestiavaloperpub" | ||
}, | ||
bip44: { | ||
coinType: 118 | ||
}, | ||
networkType: "cosmos", | ||
chainId: "celestia", | ||
chainName: "Celestia", | ||
chainSymbolImageUrl: | ||
"https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/celestia/chain.png", | ||
currencies: [ | ||
{ | ||
coinDecimals: 6, | ||
coinDenom: "TIA", | ||
coinGeckoId: "celestia", | ||
coinMinimalDenom: "utia", | ||
coinImageUrl: "https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/celestia/chain.png" | ||
} | ||
], | ||
features: [], | ||
feeCurrencies: [ | ||
{ | ||
coinDecimals: 6, | ||
coinDenom: "TIA", | ||
coinGeckoId: "celestia", | ||
coinMinimalDenom: "utia", | ||
coinImageUrl: "https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/celestia/chain.png", | ||
gasPriceStep: { | ||
low: 0.01, | ||
average: 0.02, | ||
high: 0.1 | ||
} | ||
} | ||
], | ||
rpc: "https://celestia.rpc.orai.io", | ||
rest: "https://celestia.lcd.orai.io", | ||
stakeCurrency: { | ||
coinDecimals: 6, | ||
coinDenom: "TIA", | ||
coinGeckoId: "celestia", | ||
coinMinimalDenom: "utia", | ||
coinImageUrl: "https://raw.githubusercontent.com/chainapsis/keplr-chain-registry/main/images/celestia/utia.png" | ||
}, | ||
walletUrlForStaking: "https://wallet.keplr.app/chains/celestia" | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ const [kwt2oraichain, oraichain2kwt] = KWT_ORAICHAIN_CHANNELS.split(/\s+/); | |
|
||
// exclude evm chain | ||
|
||
export const ibcInfos: IBCInfoMap = { | ||
export const ibcInfos: Omit<IBCInfoMap, "celestia"> = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Issues Found: Remaining references to "celestia" exist in multiple files. Please ensure all these references are appropriately updated or removed to maintain code integrity. 🔗 Analysis chainEnsure all references to "celestia" are properly handled The Run the following script to locate any remaining references to 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Search for any references to "celestia" in the codebase.
rg "celestia"
Length of output: 2893 |
||
"cosmoshub-4": { | ||
Oraichain: { | ||
source: "transfer", | ||
|
@@ -180,7 +180,10 @@ export const ibcInfos: IBCInfoMap = { | |
} | ||
}; | ||
|
||
export const ibcInfosOld: Omit<IBCInfoMap, "osmosis-1" | "cosmoshub-4" | "injective-1" | "noble-1" | "Neutaro-1"> = { | ||
export const ibcInfosOld: Omit< | ||
IBCInfoMap, | ||
"osmosis-1" | "cosmoshub-4" | "injective-1" | "noble-1" | "Neutaro-1" | "celestia" | ||
> = { | ||
Oraichain: { | ||
"oraibridge-subnet-2": { | ||
source: "transfer", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,7 @@ import { | |
HMSTR_ORAICHAIN_DENOM | ||
} from "./constant"; | ||
import { listOsmosisToken } from "./alpha-network"; | ||
import { celestiaNetwork } from "./celestia-network"; | ||
|
||
export type NetworkName = | ||
| "Oraichain" | ||
|
@@ -76,7 +77,8 @@ export type NetworkName = | |
| "Tron Network" | ||
| "Injective" | ||
| "Noble" | ||
| "Neutaro"; | ||
| "Neutaro" | ||
| "Celestia"; | ||
|
||
export type CosmosChainId = | ||
| "Oraichain" // oraichain | ||
|
@@ -86,7 +88,8 @@ export type CosmosChainId = | |
| "injective-1" // injective network | ||
| "kawaii_6886-1" // kawaii subnetwork | ||
| "noble-1" // noble network | ||
| "Neutaro-1"; //neutaro network; | ||
| "Neutaro-1" // neutaro network; | ||
| "celestia"; // Celestia | ||
Comment on lines
+91
to
+92
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Celestia chain ID does not follow standard conventions The chain ID
🔗 Analysis chainVerify the chain ID for Celestia follows standard conventions Chain IDs in Cosmos networks typically include a version suffix (e.g., To confirm existing chain IDs and their naming conventions, run the following script: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: List all defined chain IDs to verify naming conventions.
# Extract chain IDs from the codebase
rg --type typescript 'chainId:\s*"([\w-]+)"' -o -r '$1' | sort | uniq
Length of output: 106 Script: #!/bin/bash
# Description: List all defined chain IDs to verify naming conventions.
# Extract chain IDs from .ts and .tsx files
rg 'chainId:\s*"([\w-]+)"' --glob '*.ts' --glob '*.tsx' -o -r '$1' | sort | uniq
Length of output: 2492 |
||
|
||
export type EvmChainId = | ||
| "0x38" // bsc | ||
|
@@ -541,6 +544,7 @@ export const oraichainNetwork: CustomChainInfo = { | |
export const chainInfos: CustomChainInfo[] = [ | ||
// networks to add on keplr | ||
oraichainNetwork, | ||
celestiaNetwork, | ||
{ | ||
rpc: "https://bridge-v2.rpc.orai.io", | ||
rest: "https://bridge-v2.lcd.orai.io", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Potential Issue: Empty
features
Array in Celestia Network ConfigurationThe
features
array inpackages/oraidex-common/src/celestia-network.ts
is empty, whereas other network configurations include specific features."stargate"
and"ibc-transfer"
. The absence of these or similar features for Celestia might lead to inconsistencies or missing functionalities.Consider reviewing and updating the
features
array to include necessary features for the Celestia network.🔗 Analysis chain
LGTM: Currency configuration looks good, query about features
The currency configuration for "TIA" is correct and comprehensive.
The
features
array is empty. Is this intentional, or are there any specific features that should be added for the Celestia network?To verify if any features are typically used in other network configurations, we can run the following script:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 317
Script:
Length of output: 106
Script:
Length of output: 1228