MystenLabs / sui

Sui, a next-generation smart contract platform with high throughput, low latency, and an asset-oriented programming model powered by the Move programming language
https://sui.io
Apache License 2.0
5.99k stars 11.1k forks source link

Sir, How to get data from Mempool ? #19206

Closed MrReN closed 2 weeks ago

MrReN commented 2 weeks ago

When a user initiates a transaction, and it has been submitted to the blockchain but is not yet completed, is there a way to listen for or query it? For example, can it be queried from the Mempool? Is there a way to retrieve data for transactions in the pending state?

nonvis commented 2 weeks ago

@MrReN sui_getTransactionBlock can be called from a full node [Ref: https://docs.sui.io/sui-api-ref#sui_gettransactionblock] and if you use typescript, client.waitForTransaction can be used [Ref: https://sdk.mystenlabs.com/typescript/sui-client#waitfortransaction].

I think this question is not really suitable to ask in GH Issues. Could you direct your future inquiries to https://forums.sui.io/ next time?