We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ticker
connex
There is a very useful feature in connex to wait for the blocks to be processed instead of using a timer, called ticker.
This would be a sample usage:
public async deployAndGetTxReceipt( bytecode: string, constructorEncoded?: string, ) { const clause = { value: '0', data: bytecode + (constructorEncoded ?? ''), to: null, }; const gas = await this.connex.getGasEstimate([clause]); const signedTx = this.connex.signTransaction([clause], gas); const contract = await signedTx.request(); let txReceipt: Connex.Thor.Transaction.Receipt | null = null; //Timeout after 3 blocks for (let i = 0; i < 3; i++) { txReceipt = await this.connex.thor .transaction(contract.txid) .getReceipt(); if (txReceipt) { break; } await this.connex.thor.ticker().next(); } return txReceipt; }
The text was updated successfully, but these errors were encountered:
Hey @freemanzMrojo , are there other use-cases other than waiting the one in the example that can only be handled with the ticker? How urgent this is?
Sorry, something went wrong.
hi @victhorbi , it is not urgent, this feature just came up in a conversation with @claytonneal last week, so I logged it 👍
No branches or pull requests
Summary
There is a very useful feature in
connex
to wait for the blocks to be processed instead of using a timer, calledticker
.Basic Example
This would be a sample usage:
The text was updated successfully, but these errors were encountered: