Skip to content

Commit 00a9516

Browse files
committed
Update pack open gas
1 parent 776737f commit 00a9516

File tree

1 file changed

+3
-3
lines changed
  • Assets/Thirdweb/Core/Scripts

1 file changed

+3
-3
lines changed

Assets/Thirdweb/Core/Scripts/Pack.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ public class Pack : Routable
1919
/// <summary>
2020
/// Interact with a Marketplace contract.
2121
/// </summary>
22-
public Pack(string chain, string address) : base($"{address}{subSeparator}pack")
22+
public Pack(string chain, string address)
23+
: base($"{address}{subSeparator}pack")
2324
{
2425
this.chain = chain;
2526
this.contractAddress = address;
@@ -341,8 +342,7 @@ public async Task<PackRewards> Open(string packId, string amount = "1", int gasL
341342
else
342343
{
343344
var openPackFunction = new PackContract.OpenPackFunction() { PackId = BigInteger.Parse(packId), AmountToOpen = BigInteger.Parse(amount) };
344-
openPackFunction.Gas = gasLimit;
345-
var openPackResult = await TransactionManager.ThirdwebWriteRawResult(contractAddress, openPackFunction);
345+
var openPackResult = await TransactionManager.ThirdwebWriteRawResult(contractAddress, openPackFunction, null, gasLimit);
346346

347347
var packOpenedEvents = openPackResult.DecodeAllEvents<PackContract.PackOpenedEventDTO>();
348348
List<PackContract.Token> tokensAwarded = new List<PackContract.Token>();

0 commit comments

Comments
 (0)