Skip to content

Commit

Permalink
Remove tx receipt polling on native
Browse files Browse the repository at this point in the history
  • Loading branch information
skibitsky committed Aug 2, 2024
1 parent fadfce9 commit 3921a9a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ public Task<string> WriteContractAsync(string contractAddress, string contractAb
return WriteContractAsync(contractAddress, contractAbi, methodName, default, default, arguments);
}

public Task<string> WriteContractAsync(string contractAddress, string contractAbi, string methodName, BigInteger gas = default, params object[] arguments)
{
return WriteContractAsyncCore(contractAddress, contractAbi, methodName, default, gas, arguments);
}

public Task<string> WriteContractAsync(string contractAddress, string contractAbi, string methodName, BigInteger value = default, BigInteger gas = default, params object[] arguments)
{
return WriteContractAsyncCore(contractAddress, contractAbi, methodName, value, gas, arguments);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,12 @@ protected override async Task<string> WriteContractAsyncCore(string contractAddr
var contract = Web3.Eth.GetContract(contractAbi, contractAddress);
var function = contract.GetFunction(methodName);

var receipt = await function.SendTransactionAndWaitForReceiptAsync(
from: null, // will be automatically filled by interceptor
gas: new HexBigInteger(gas),
value: new HexBigInteger(value),
receiptRequestCancellationToken: CancellationToken.None,
return await function.SendTransactionAsync(
null, // will be automatically filled by interceptor
new HexBigInteger(gas),
new HexBigInteger(value),
arguments
);

return receipt.TransactionHash;
}


Expand Down

0 comments on commit 3921a9a

Please sign in to comment.