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

@ton-api/ton-adapter Not a cell: int #224

Open
shnmrc opened this issue Feb 7, 2025 · 2 comments
Open

@ton-api/ton-adapter Not a cell: int #224

shnmrc opened this issue Feb 7, 2025 · 2 comments

Comments

@shnmrc
Copy link

shnmrc commented Feb 7, 2025

const ta = new TonApiClient()

const pool = ta.open(Pool.createFromAddress(TON_USDT));

const estimatedSwapOut = await pool.getEstimatedSwapOut({
  assetIn: Asset.native(),
  amountIn: toNano(1),
});
Error: Not a cell: int
at TupleReader.readCell

Problem only with TonApiClient, with TonClient4 all fine

@hlhdai
Copy link

hlhdai commented Feb 14, 2025

I've met the same issue

async getPoolAddress(provider, { poolType, assets, }) {
const result = await provider.get('get_pool_address', [
{ type: 'int', value: BigInt(poolType) },
{ type: 'slice', cell: assets[0].toSlice().asCell() },
{ type: 'slice', cell: assets[1].toSlice().asCell() },
]);
return result.stack.readAddress();
}

Error: Not a cell: int
at TupleReader.readCell

@mois-ilya
Copy link
Collaborator

Unfortunately, the adapter is currently written only for TonClient, not for TonClient4, which is a limitation.
As soon as I am free, I will expand it.

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

No branches or pull requests

3 participants