Contract.SendWithReceipt never completes
Describe the bug
We just migrated to version 2.5.5 and we are adjusting our minting feature code. We have an issue where executing a method from our SC with SendWithReceipt doesn't work. There is no error shown in the console, it just stops at message "[Web3] Transaction executed with hash xxx" (attached below).
This is how we created the contract instance:
var web3Builder = new Web3Builder(blockchainConfig, blockchainConfig); // blockchainConfig has the contract address & ABI
web3Builder.Configure((service) =>
{
service
.UseUnityEnvironment()
.UseMultiCall()
.UseRpcProvider();
additionalConfigurations(service);
});
web3 = await web3Builder.LaunchAsync();
// Create contract
contract = web3.ContractBuilder.Build(blockchainConfig.contractABI, blockchainConfig.contractAddress);
The additionalConfiguration being:
service
.UseMetaMask()
.UseMetaMaskSigner()
.UseMetaMaskTransactionExecutor();
And finally this is how the SC is accessed:
var method = "approve";
var parameter = new object[]{
"someAddress",
"100000000000000000000000000000000000000000",
};
(var res, var receipt) = await contract.SendWithReceipt(method, parameter);
var transactionHash = receipt.TransactionHash;
Debug.Log("Approval granted. Saving result to server now. Hash: " + transactionHash);
However the message "Approval granted" never gets printed, meaning it stopped in the SendWithReceipt method. The transaction does go through obviously, given it prints the hash. If I have to guess the issue is in either of these methods, most probably the later (Contract.cs):
Expected behavior The execution should complete and return the receipt instance.
Console errors [Web3] Transaction executed with hash 0xbffd20411f37ece8bec59287c8acaae92dc30612afdcd85e19b470c7205160cc
Screenshots/Video
Desktop (please complete the following information):
- Chainsafe SDK version: 2.5.5
- Unity Version: 2022.3.10f1 WebGL
- Operating System: Windows 10
@juans-chainsafe , would you mind taking a look 🙏🏼 ...
Apologies... After further inspection it's actually our fault, we input the wrong RPC.
No worries .. 🙏🏼