Hi everyone!
What is the best way to aggregate on-chain data in TON? Is there something like thegraph? Lets say I have big smart-contract and I need to collect all events and do some math on top of them.

Sep 28, 2023, 12:29 PM
It’s a very complex and general question and the answer mostly depends on the exact use case
Sep 28, 2023, 12:29 PM
I can give you more precise example.
Lets image I have lending protocol or perp. I need to collect all users positions/debt and store them offchain, so I can effectively do some math on top of them and be able to liquidate them in time. Lets say all events that I need are emitted in 1 contracts, so I just need to monitor 1 contract
Sep 28, 2023, 12:32 PM
You want to parse some data from smart contracts using offchain tools?
Sep 28, 2023, 12:32 PM
Yes. If you need details - I need to store all ext out msgs (of my smart) in my db
Sep 28, 2023, 12:33 PM
Just process all transactions of that smart contract
Sep 28, 2023, 12:34 PM
Thats pretty common case actually, I am sure there are some tools for that
Soooo, just SDK ?
Sep 28, 2023, 12:35 PM
I’m not sure if there are ready-to-use tools for that.
Sep 28, 2023, 12:35 PM
Ok, I ll look in SDK docs, thx for help
@Gusarich 1 more question - is there any preferred SDK lib here ? https://docs.ton.org/develop/dapps/apis/sdk
maybe some are outdated?
Sep 28, 2023, 12:38 PM
For js/ts I’d recommend using @ton/ton (github.com/ton-org/ton)
Sep 28, 2023, 12:40 PM

© 2024 Draquery.com All rights reserved.