Skip to content

Commit

Permalink
feat: update send transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
nattb8 committed Oct 16, 2024
1 parent 74db40e commit 717723c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Assets/Shared/Scripts/UI/UnlockedSkinScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,19 @@ private async void Craft()
CraftState = CraftSkinState.Crafting;

// Burn tokens and mint a new skin i.e. crafting a skin
string transactionHash = await Passport.Instance.ZkEvmSendTransaction(new TransactionRequest()
TransactionReceiptResponse response = await Passport.Instance.ZkEvmSendTransactionWithConfirmation(new TransactionRequest()
{
to = "YOUR_IMMUTABLE_RUNNER_TOKEN_CONTRACT_ADDRESS", // Immutable Runner Token contract address
data = "0x1e957f1e", // Call craftSkin() in the contract
value = "0"
});
Debug.Log($"Craft transaction hash: {transactionHash}");
Debug.Log($"Craft transaction hash: {response.transactionHash}");

if (response.status != "1")
{
m_CraftState = CraftSkinState.Failed;
return;
}

CraftState = CraftSkinState.Crafted;

Expand Down

0 comments on commit 717723c

Please sign in to comment.