DEV Community

2 1

Cannot transfer ONG via JS-SDK

Hi Ontology dev team,

We stuck with an issue of transfer ONG coin from Ontology EVM to Ontology Native via JS-SDK, this is hard for us to integrate Ontology into our popular crypto ShibaWallet.

Our team is eager to solve the problem so that we hope the dev team is able to answer it here, please.

We just follow the step on docs.https://ontio.github.io/documentation/tutorial_for_developer_en.html

The error is saying: Insufficient balance, but my account actually has 6000 ONG and I can see it on the block exporer explorer.ont.io

Please! please!

Environment:
"ontology-ts-sdk": "^2.0.0"

To get the balance:

const rest = new OntWallet.RestClient(CONST.MAIN_ONT_URL.REST_UR);
let balance = await rest.getBalanceV2(addr)
Enter fullscreen mode Exit fullscreen mode

Image description

To make a transaction:

OntAssetTxBuilder.makeWithdrawOngTx(from, _to, amount, payer, gasPrice, gasLimit);
Enter fullscreen mode Exit fullscreen mode

or

OntAssetTxBuilder.makeTransferTx(assetType, from, _to, amount, gasPrice, gasLimit, payer);
Enter fullscreen mode Exit fullscreen mode

Both are failed to send due to insufficient balance.

Image description

Code snippet:
Image description

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (1)

Collapse
 
holgrs profile image
holgrs •

@shibawalletpro Did you solve your problem?

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

đź‘‹ Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay