-
Notifications
You must be signed in to change notification settings - Fork 198
feat(swapper): add Panora swapper for Aptos swaps #12492
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
Open
swdiscordia
wants to merge
16
commits into
shapeshift:develop
Choose a base branch
from
swdiscordia:feat/panora-swapper
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
5f5ab70
feat: add Aptos HDWallet support (core + native adapter)
31978aa
feat: add Aptos CAIP constants, types, and utils (web-ohh.4)
d8bb82e
feat: add AptosChainAdapter implementation (web-ohh.3)
b36e18f
feat: add Aptos plugin, feature flag, config, and CSP headers (web-oh…
442da85
feat: add Aptos CoinGecko integration and asset generation (web-ohh.7)
5b7eb18
feat: add Aptos account derivation and portfolio wiring (web-ohh.6)
fcb9bed
feat: add Aptos swapper types to Swapper/SwapperApi (web-ohh.10)
dacf127
feat(aptos): complete Aptos integration wiring
swdiscordia 3fe9d95
fix(aptos): use gas_used not max_gas_amount for fee estimation
swdiscordia 9044d03
fix(aptos): address CodeRabbit review findings (9 items)
swdiscordia 838966d
fix(chain-adapters): bail verifyLedgerAppOpen for non-Ledger wallets …
swdiscordia c5cd260
refactor(aptos): use CoinGecko tokenlist for asset generation
swdiscordia f007bc7
chore(deps): regenerate pnpm-lock for aptos deps after rebase
swdiscordia fb88d71
fix(aptos): register aptos chain type in public-api chain list
swdiscordia a6b12c9
feat: register PanoraSwapper with feature flag and CSP (web-ohh.12)
e013ce3
feat: add PanoraSwapper implementation (web-ohh.11)
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| name: Aptos Chain Integration | ||
| description: Validate Aptos chain integration - account discovery, balance display, native APT visibility, and asset picker integration. Mirrors the chain-integration-template.md test scenario used for Solana. | ||
| route: /trade | ||
| depends_on: | ||
| - wallet-health.yaml | ||
| steps: | ||
| - name: Open Manage Accounts modal | ||
| instruction: > | ||
| After wallet is unlocked and trade page is loaded, click the wallet button in the | ||
| top right (shows wallet name e.g. "teest"). Then click the three-dot menu icon | ||
| and select "Manage Accounts". | ||
| expected: Manage Accounts modal opened, list of supported chains displayed | ||
| screenshot: true | ||
|
|
||
| - name: Verify Aptos appears in chain list | ||
| instruction: > | ||
| In the Manage Accounts modal, scroll through the supported chains list and | ||
| verify "Aptos" appears as one of the available chains. | ||
| expected: Aptos is visible in the supported chains list | ||
| screenshot: true | ||
|
|
||
| - name: Discover Aptos account | ||
| instruction: > | ||
| Click on the Aptos chain row to expand it. If no account is shown, click | ||
| "Add Account" or the "+" button to derive the first Aptos account | ||
| (BIP44 path m/44'/637'/0'/0'/0'). Wait for the address to appear. | ||
| expected: An Aptos account address (0x followed by 64 hex chars) is shown | ||
| screenshot: true | ||
|
|
||
| - name: Close modal and verify Aptos in portfolio | ||
| instruction: > | ||
| Close the Manage Accounts modal. Navigate to the Dashboard (or Portfolio) page. | ||
| Look for Aptos chain in the asset list, or filter by chain to confirm Aptos | ||
| assets appear. | ||
| expected: Aptos chain and its native asset APT are visible in the portfolio | ||
| screenshot: true | ||
|
|
||
| - name: Open asset picker and search for APT | ||
| instruction: > | ||
| Navigate to /trade. Click the sell asset selector button. In the asset picker | ||
| dialog, type "APT" in the search box. Wait for the results to filter. | ||
| expected: APT (Aptos Coin) appears in the search results | ||
| screenshot: true | ||
|
|
||
| - name: Select APT as sell asset | ||
| instruction: > | ||
| Click "APT" (Aptos Coin, Aptos chain) from the search results. Wait for the | ||
| dialog to close and APT to appear as the sell asset. | ||
| expected: APT is selected as the sell asset, the chain filter shows Aptos | ||
| screenshot: true | ||
|
|
||
| - name: Verify Aptos chain filter in buy asset picker | ||
| instruction: > | ||
| Click the buy/receive asset selector. In the asset picker dialog, find and click | ||
| the Aptos chain filter chip (if available). Verify that filtering shows multiple | ||
| Aptos assets (e.g. APT, USDC, USDT, MOD, thAPT). | ||
| expected: Multiple Aptos-chain assets are listed (>= 5 tokens) | ||
| screenshot: true | ||
|
|
||
| - name: Verify APT native balance reads correctly | ||
| instruction: > | ||
| Close the asset picker. Look at the APT balance shown next to the sell input | ||
| ("Balance: X APT" or similar). Verify the balance is a numeric value (could be | ||
| 0 if test wallet has no APT, but should not be "N/A" or an error). | ||
| expected: APT balance is displayed as a numeric value (including 0) | ||
| screenshot: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import { loadEnv } from 'vite' | ||
|
|
||
| import type { Csp } from '../../types' | ||
|
|
||
| const mode = process.env.MODE ?? process.env.NODE_ENV ?? 'development' | ||
| const env = loadEnv(mode, process.cwd(), '') | ||
|
|
||
| export const csp: Csp = { | ||
| 'connect-src': [ | ||
| env.VITE_APTOS_NODE_URL, | ||
| env.VITE_APTOS_INDEXER_URL, | ||
| 'https://fullnode.mainnet.aptoslabs.com/', | ||
| 'https://api.mainnet.aptoslabs.com/', | ||
| ], | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import type { Csp } from '../../types' | ||
|
|
||
| export const csp: Csp = { | ||
| 'connect-src': ['https://api.panora.exchange'], | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/caip/src/adapters/coingecko/generated/aptos_861fb8e6/adapter.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"aptos:861fb8e6/slip44:637": "aptos", "aptos:861fb8e6/coin:0x357b0b74bc833e95a115ad22604854d6b0fca151cecd94111770e5d6ffc9dc2b": "tether", "aptos:861fb8e6/coin:0xbae207659db88bea0cbead6da0ed00aac12edcdda169e591cd41c94180b46f3b": "usd-coin", "aptos:861fb8e6/coin:0x05fabd1b12e39967a3c24e91b7b8f67719a6dacee74f3c8b9fb7d93e855437d2": "usd1-wlfi", "aptos:861fb8e6/coin:0x68844a0d7f2587e726ad0579f3d640865bb4162c08a4589eeda3f9689ec52a3d": "wrapped-bitcoin", "aptos:861fb8e6/coin:0x435ad41e7b383cef98899c4e5a22c8dc88ab67b22f95e5663d6c6649298c3a9d": "hyperion", "aptos:861fb8e6/coin:0x878370592f9129e14b76558689a4b570ad22678111df775befbfcbc9fb3d90ab": "merkle-trade", "aptos:861fb8e6/coin:0xb36527754eb54d7ff55daf13bcb54b42b88ec484bd6f0e3b2e0d1db169de6451": "ami", "aptos:861fb8e6/coin:0x02370cc1d995f3aadd337c1c6c63834ad8d2bd0cdc70bc8dff81de463e18b159": "pontem-liquidswap", "aptos:861fb8e6/coin:0x377adc4848552eb2ea17259be928001923efe12271fef1667e2b784f04a7cf3a": "thala", "aptos:861fb8e6/coin:0x2ebb2ccac5e027a87fa0e2e5f656a3a4238d6a48d93ec9b610d570fc0aa0df12": "cellena-finance", "aptos:861fb8e6/coin:0x0009da434d9b873b5159e8eeed70202ad22dc075867a7793234fbc981b63e119": "gui-inu", "aptos:861fb8e6/coin:0x378d5ba871c3d1bdf477a617f997f23d9e0702de97a02f42925b44fa3abc9866": "meso-finance", "aptos:861fb8e6/coin:0x79e8a5ddb82aa53854c1348c2865fd00732a41937dc1c160a4a50205537bd740": "tomarket", "aptos:861fb8e6/coin:0xb27b0c6b60772f0fc804ec1cd3339f552badf9bd1e125a7dd700d8eb11248ef1": "doodoo", "aptos:861fb8e6/coin:0xf37a8864fe737eb8ec2c2931047047cbaed1beed3fb0e5b7c5526dafd3b9c2e9": "ethena-usde", "aptos:861fb8e6/coin:0xa259be733b6a759909f92815927fa213904df6540519568692caf0b068fe8e62": "amnis-aptos", "aptos:861fb8e6/coin:0xb614bfdf9edc39b330bbf9c3c5bcd0473eee2f6d4e21748629cc367869ece627": "amnis-staked-aptos-coin", "aptos:861fb8e6/coin:0xa0d9d647c5737a5aed08d2cfeb39c31cf901d44bc4aa024eaa7e5e68b804e011": "thala-apt", "aptos:861fb8e6/coin:0x0a9ce1bddf93b074697ec5e483bc5050bc64cff2acd31e1ccfd8ac8cae5e4abe": "staked-thala-apt", "aptos:861fb8e6/coin:0x821c94e69bc7ca058c913b7b5e6b0a5c9fd1523d58723a966fb8c1f5ea888105": "kofi-aptos", "aptos:861fb8e6/coin:0x42556039b88593e768c97ab1a3ab0c6a17230825769304482dff8fdebe4c002b": "staked-kofi-aptos", "aptos:861fb8e6/coin:0x94ed76d3d66cb0b6e7a3ab81acf830e3a50b8ae3cfb9edc0abea635a11185ff4": "move-dollar", "aptos:861fb8e6/coin:0x2b3be0a97a73c87ff62cbdd36837a9fb5bbd1d7f06a73b7ed62ec15c5326c1b8": "layerzero-bridged-usdc-aptos", "aptos:861fb8e6/coin:0xe568e9322107a5c9ba4cbd05a630a5586aa73e744ada246c3efb0f4ce3e295f3": "layerzero-bridged-usdt-aptos", "aptos:861fb8e6/coin:0xae02f68520afd221a5cd6fda6f5500afedab8d0a2e19a916d6d8bc2b36e758db": "layerzero-bridged-weth-aptos", "aptos:861fb8e6/coin:0x54fc0d5fa5ad975ede1bf8b1c892ae018745a1afd4a4da9b70bb6e5448509fc0": "bridged-usd-coin-wormhole-ethereum", "aptos:861fb8e6/coin:0xf599112bc3a5b6092469890d6a2f353f485a6193c9d36626b480704467d3f4c8": "abtc", "aptos:861fb8e6/coin:0x8e51106b139001f1f25a320066621a2e0d140724ee9be1d49aaf9e76ceb24d75": "bedrock-btc", "aptos:861fb8e6/coin:0xf764dbfd6999067ac052a8e722ae359bec389bd7dba19ead586801b99b81b075": "universal-btc", "aptos:861fb8e6/coin:0x5915ae0eae3701833fa02e28bf530bc01ca96a5f010ac8deecb14c7a92661368": "uptos", "aptos:861fb8e6/coin:0x1fe81b3886ff129d42064f7ee934013de7ef968cb8f47adb5f7210192bcd4a23": "chewy-token", "aptos:861fb8e6/coin:0xa0fa5918da73235921c6120597db820df0be391d0056dc0a7ee7a80b83f29d64": "moo-moo", "aptos:861fb8e6/coin:0x4c3efb98d8d3662352f331b3465c6df263d1a7e84f002844348519614a5fea30": "movegpt", "aptos:861fb8e6/coin:0xd08a1ab00895c35dd19b356f5747355ebcd58cf5e684c15e6808d760ffd6beff": "hair", "aptos:861fb8e6/coin:0xad18575b0e51dd056e1e082223c0e014cbfe4b13bc55e92f450585884f4cf951": "pancakeswap-token", "aptos:861fb8e6/coin:0xaef6a8c3182e076db72d64324617114cacf9a52f28325edc10b483f7f05da0e7": "trufin-staked-apt", "aptos:861fb8e6/coin:0xa64d2d6f5e26daf6a3552f51d4110343b1a8c8046d0a9e72fa4086a337f3236c": "layerzero-bridged-wbtc-aptos", "aptos:861fb8e6/coin:0xc692943f7b340f02191c5de8dac2f827e0b66b3ed2206206a3526bcb0cae6e40": "cash-2", "aptos:861fb8e6/coin:0xb30a694a344edee467d9f82330bbe7c3b89f440a1ecd2da1f3bca266560fce69": "ethena-staked-usde", "aptos:861fb8e6/coin:0x92410a41654236295001f06375afbb1786dbd14bc1c42a33bfcf50204c248bb7": "ethereum-wormhole", "aptos:861fb8e6/coin:0x700e285ee9f4fc9b0e42a6217e329899e1353476bc532a484048008c8bc8e400": "stakestone-ether", "aptos:861fb8e6/coin:0xfbd6406c12cab2aef728c917a365cdb73883213f74af5e8a46c8fbd77b623ee7": "wrapped-ether-celer", "aptos:861fb8e6/coin:0x6dba1728c73363be1bdd4d504844c40fbb893e368ccbeff1d1bd83497dbc756d": "propbase", "aptos:861fb8e6/coin:0xe528f4df568eb9fff6398adc514bc9585fab397f478972bcbebf1e75dee40a88": "apollo-diversified-credit-securitize-fund", "aptos:861fb8e6/coin:0x50038be55be5b964cfa32cf128b5cf05f123959f286b4cc02b86cafd48945f89": "blackrock-usd-institutional-digital-liquidity-fund"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: shapeshift/web
Length of output: 614
Use CoinGecko’s Aptos platform id
aptos.aptos-networkdoes not match the asset platforms API response, so Aptos token lookups will fail.🤖 Prompt for AI Agents