Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Update prepare.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
0xFirekeeper committed Sep 8, 2023
1 parent 1ae9322 commit 20b21f9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/unity/interacting-with-contracts/prepare.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ To gain more granular control over the transaction process, all Contract objects

```csharp
string connectedAddress = await ThirdwebManager.Instance.SDK.wallet.GetAddress();
Transaction transaction = await contract.Prepare(functionName: "claim", from: connectedAddress, args: new object[] { connectedAddress, 0, 1 });
Transaction transaction = await contract.Prepare(
functionName: "claim",
from: connectedAddress, // optional, defaults to connected address
args: new object[] { connectedAddress, 0, 1 }
);
// transaction.SetValue("0.00000000001");
// transaction.SetGasLimit("100000");
Expand Down Expand Up @@ -120,9 +124,9 @@ string;
</div>
</details>

## WaitForTransactionResult
## Execute

Waits for the transaction result asynchronously.
Send the transaction and wait for it to be mined. This is useful for when you want the transaction to be executed, and need the data returned.

```csharp
TransactionResult result = await tx.SendAndWaitForTransactionResult();
Expand Down

0 comments on commit 20b21f9

Please sign in to comment.