decentraland / sdk

PM repository for SDK
Apache License 2.0
4 stars 4 forks source link

[BUG] SDK7 EthConnect seems to have no way to determine that a contract method has been mined and confirmed. #1011

Open cfravel opened 10 months ago

cfravel commented 10 months ago

After making a contract function call (such as 'transfer'), I want to wait until the transaction has been mined, not just submitted and pending, to act on the payment.

I have tried each of these methods, which do exist in EthConnect: let tr1:EthConnect.FinishedTransactionAndReceipt = await requestManager.getConfirmedTransaction(tx) let tr2:EthConnect.FinishedTransactionAndReceipt = await requestManager.waitForCompletion(tx)

When I use them, I receive this error in the console: RemoteError: The Ethereum method "eth_getTransactionByHash" is blacklisted on Decentraland Provider

1) I assume eth_getTransactionByHash is called by both of the above methods 2) Is it really important that it (and perhaps these) are blacklisted, and if so why specifically? 3) How should I, in the restricted EthConnect library, determine when a transaction has been mined, or better yet, received some specified number of block confirmations?