Skip to content
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

Invalid pool type when call getPools #33

Open
hstarorg opened this issue Oct 3, 2024 · 1 comment
Open

Invalid pool type when call getPools #33

hstarorg opened this issue Oct 3, 2024 · 1 comment

Comments

@hstarorg
Copy link

hstarorg commented Oct 3, 2024

Steps to reproduce:

import { Network, TurbosSdk } from 'turbos-clmm-sdk';

const turbosSdk = new TurbosSdk(Network.testnet);
const pools = await turbosSdk.pool.getPools();
console.log(pools);

Will throw error:

throw new Error('Invalid pool type');
@hstarorg
Copy link
Author

hstarorg commented Oct 3, 2024

After analysis, the error caught by: const types = this.parsePoolType(type, 3);

// Right type, can correctly parse
0xfea145c1608cd5366ffcf278c0124d9f416b30e33a6a47ee12c615420ee0224c::pool::Pool<0x2::fir::FIR, 0x99d6294b9ddbfa504488cea88ff2a293b6650f4845a6bfc0596c3fc687ee6d33::giraffe::GIRAFFE, 0xfea145c1608cd5366ffcf278c0124d9f416b30e33a6a47ee12c615420ee0224c::fee3000bps::FEE3000BPS>

// Error type, will parse failed
0xfea145c1608cd5366ffcf278c0124d9f416b30e33a6a47ee12c615420ee0224c::pool::Pool<0x2::sui::SUI, 0x2::coin::TreasuryCap<0x1a7871eef928c3b2eaaf86389f205ae3f296c84131851a7d0f8ea1359537a350::mycoin::MYCOIN>, 0xfea145c1608cd5366ffcf278c0124d9f416b30e33a6a47ee12c615420ee0224c::fee100bps::FEE100BPS>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant