Skip to content

Commit 2453094

Browse files
committed
Bridge update
1 parent f7976ad commit 2453094

File tree

2 files changed

+126612
-124479
lines changed

2 files changed

+126612
-124479
lines changed

Assets/Thirdweb/Examples/Scripts/Prefabs/Prefab_Miscellaneous.cs

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public async void CustomCall()
2424
Contract contract = ThirdwebManager.Instance.SDK.GetContract("0x62Cf5485B6C24b707E47C5E0FB2EAe7EbE18EC4c", MY_CUSTOM_CONTRACT_ABI);
2525

2626
// Contract.Read
27-
// string uri = await contract.Read<string>("uri", 0);
28-
// Debugger.Instance.Log("[Custom Call] Read Custom URI Successful", uri);
27+
string uri = await contract.Read<string>("uri", 0);
28+
Debugger.Instance.Log("[Custom Call] Read Custom URI Successful", uri);
2929

3030
// Contract.Write
3131
// TransactionResult transactionResult = await contract.Write("claimKitten");
@@ -37,41 +37,41 @@ public async void CustomCall()
3737
// }, "0xE79ee09bD47F4F5381dbbACaCff2040f2FbC5803", 0, 1);
3838

3939
// Contract.Prepare
40-
string connectedAddress = await ThirdwebManager.Instance.SDK.wallet.GetAddress();
41-
Transaction transaction = await contract.Prepare(functionName: "claim", from: connectedAddress, connectedAddress, 0, 1);
42-
// transaction.SetValue("0.00000000001");
43-
// transaction.SetGasLimit("100000");
40+
// string connectedAddress = await ThirdwebManager.Instance.SDK.wallet.GetAddress();
41+
// Transaction transaction = await contract.Prepare(functionName: "claim", from: connectedAddress, connectedAddress, 0, 1);
42+
// // transaction.SetValue("0.00000000001");
43+
// // transaction.SetGasLimit("100000");
4444

45-
try
46-
{
47-
var data = await transaction.Simulate();
48-
Debugger.Instance.Log("[Custom Call] Simulate Successful", "Data: " + data.ToString() + " \nSending Transaction...");
49-
}
50-
catch (System.Exception e)
51-
{
52-
Debugger.Instance.Log("[Custom Call] Simulate Error", e.Message);
53-
return;
54-
}
45+
// try
46+
// {
47+
// var data = await transaction.Simulate();
48+
// Debugger.Instance.Log("[Custom Call] Simulate Successful", "Data: " + data.ToString() + " \nSending Transaction...");
49+
// }
50+
// catch (System.Exception e)
51+
// {
52+
// Debugger.Instance.Log("[Custom Call] Simulate Error", e.Message);
53+
// return;
54+
// }
5555

56-
await transaction.EstimateAndSetGasLimitAsync();
56+
// await transaction.EstimateAndSetGasLimitAsync();
5757

58-
var gasPrice = await transaction.GetGasPrice();
59-
Debug.Log($"Gas Price: {gasPrice}");
58+
// var gasPrice = await transaction.GetGasPrice();
59+
// Debug.Log($"Gas Price: {gasPrice}");
6060

61-
var gasCosts = await transaction.EstimateGasCosts();
62-
Debug.Log($"Gas Cost: {gasCosts.wei} WEI");
61+
// var gasCosts = await transaction.EstimateGasCosts();
62+
// Debug.Log($"Gas Cost: {gasCosts.wei} WEI");
6363

64-
Debugger.Instance.Log("[Custom Call] Transaction Preview", transaction.ToString());
64+
// Debugger.Instance.Log("[Custom Call] Transaction Preview", transaction.ToString());
6565

66-
try
67-
{
68-
string transactionResult = await transaction.Send(gasless: false);
69-
Debugger.Instance.Log("[Custom Call] Send Successful", "Tx Hash: " + transactionResult);
70-
}
71-
catch (System.Exception e)
72-
{
73-
Debugger.Instance.Log("[Custom Call] Send Error", e.ToString());
74-
}
66+
// try
67+
// {
68+
// string transactionResult = await transaction.Send(gasless: false);
69+
// Debugger.Instance.Log("[Custom Call] Send Successful", "Tx Hash: " + transactionResult);
70+
// }
71+
// catch (System.Exception e)
72+
// {
73+
// Debugger.Instance.Log("[Custom Call] Send Error", e.ToString());
74+
// }
7575
}
7676
catch (System.Exception e)
7777
{

0 commit comments

Comments
 (0)