Moralis execute function

can i do something like that on moralis executefunctions method ?
.on(‘transactionHash’, hash => {
…
}).on(‘confirmation’, (num, receipt) => {
…
})

?

i know but i wanna use .on() …
Is that possible too ?
In web3 documentation you can do so

No, You can’t do that. Rather,
In the item returned tx, you got the hash there, you can then tx.wait(NUMBER_OF_CONFIRMATIONS) to get full data once it’s confirmed

okay thank you. Does it work with await web3.eth.sendTransaction(transactionObject); ???

No. Here are the available callback for that https://web3js.readthedocs.io/en/v1.2.1/callbacks-promises-events.html.

tx.wait() is for moralis executeFunction which now uses ethers

1 Like

You need to use web3.js directly if you want to keep using that same type of code/syntax. It is a different library.

web3.js

1 Like