You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The deployContract method in the ContractFactory currently submits the transaction and waits for it to be processed. This synchronous approach can lead to significant delays, as transaction processing times in a blockchain environment often take several seconds.
Having this method always act as a blocking call is impractical for real-world blockchain environments as it forces developers to wait for transaction completion before proceeding with other tasks.
The deployContract method should only wait for the TX to be processed if the user explicitly chooses to do it. This non-blocking approach should be the default behavior, as blocking the UI is not what users usually desire.
@arboleya Yes, we will also need to change the method's response type.
Currently, it returns an instance of the Contract class, ready to be used. This is only possible because the method waits for the transaction to be processed.
The ideal approach would be to have the deployContract method simply submit the transaction and return something that can be used to fetch the transaction, such as its ID or an instance of TransactionResponse. This way, dApp applications wouldn't get blocked when submitting the TX, and they would receive the transaction ID as a response, making it possible to attach hooks to fetch its status.
The deployContract method in the
ContractFactory
currently submits the transaction and waits for it to be processed. This synchronous approach can lead to significant delays, as transaction processing times in a blockchain environment often take several seconds.Having this method always act as a blocking call is impractical for real-world blockchain environments as it forces developers to wait for transaction completion before proceeding with other tasks.
The
deployContract
method should only wait for the TX to be processed if the user explicitly chooses to do it. This non-blocking approach should be the default behavior, as blocking the UI is not what users usually desire.The text was updated successfully, but these errors were encountered: