Skip to content

Commit

Permalink
feat: craft skin
Browse files Browse the repository at this point in the history
  • Loading branch information
nattb8 authored and ImmutableJeffrey committed Oct 21, 2024
1 parent 2860f1e commit b3008bc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Assets/Shared/Scripts/UI/UnlockedSkinScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Immutable.Passport;
using Immutable.Passport.Model;

namespace HyperCasual.Runner
{
Expand Down Expand Up @@ -116,7 +118,13 @@ private async void Craft()
CraftState = CraftSkinState.Crafting;

// Burn tokens and mint a new skin i.e. crafting a skin
await Task.Delay(TimeSpan.FromSeconds(5));
string transactionHash = await Passport.Instance.ZkEvmSendTransaction(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}");

CraftState = CraftSkinState.Crafted;

Expand Down

0 comments on commit b3008bc

Please sign in to comment.