solcpp icon indicating copy to clipboard operation
solcpp copied to clipboard

Solana: Add confirmTransaction endpoint based on web3.js

Open aniketfuryrocks opened this issue 2 years ago • 3 comments

Implement the feature confirmTransaction

Feature request moved from issue #40

aniketfuryrocks avatar Oct 06 '22 15:10 aniketfuryrocks

https://github.com/blockworks-foundation/mango-client-v3/blob/d34d248a3c9a97d51d977139f61cd982278b7f01/src/client.ts#L546

this is a working and well tested implementation for confirmTransaction in typescript the way this works:

a) define timeout, either by constant time (bad) or by optional BlockhashWithExpiryBlockHeight b) open a onSignature websocket connection - would leave this out for now and add it later when websockets are working c) poll every 2 seconds getSignatureStatuses - should work well enough for now

mschneider avatar Oct 11 '22 11:10 mschneider

Implementation based on c done. After testing, I will open a new PR once the current gets merged

Lioncat2002 avatar Oct 14 '22 02:10 Lioncat2002

This issue is worked on in https://github.com/mschneider/solcpp/pull/58 given that @pSN0W is not ready yet, please try to implement a simplified version that uses a blockheight and signature status. Any timing based implementation won’t work reliably

mschneider avatar Oct 22 '22 10:10 mschneider