Skip to content

Commit efa003a

Browse files
committed
Placeholders and fix keypair path
1 parent 12f9145 commit efa003a

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

packages/preset-lumberjack/src/generators/preset/files/program/Anchor.toml.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ url = "https://anchor.projectserum.com"
88

99
[provider]
1010
cluster = "devnet"
11-
wallet = "/Users/jonasmac2/.config/solana/id.json"
11+
wallet = "~/.config/solana/id.json"
1212

1313
[scripts]
1414
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"

packages/preset-lumberjack/src/generators/preset/files/program/programs/__name__/Cargo.toml.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
2-
name = "lumberjack"
2+
name = "<%=underscoreName%>"
33
version = "0.1.0"
44
description = "Created with Anchor"
55
edition = "2021"
66

77
[lib]
88
crate-type = ["cdylib", "lib"]
9-
name = "lumberjack"
9+
name = "<%=underscoreName%>"
1010

1111
[features]
1212
no-entrypoint = []

packages/preset-lumberjack/src/generators/preset/files/unity/__className__/Assets/Game/Scripts/Solana/AnchorService.cs.template

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ using System.Threading.Tasks;
66
using Cysharp.Threading.Tasks;
77
using Frictionless;
88
using Game.Scripts.Ui;
9-
using Lumberjack;
10-
using Lumberjack.Accounts;
11-
using Lumberjack.Program;
9+
using <%=className%>;
10+
using <%=className%>.Accounts;
11+
using <%=className%>.Program;
1212
using Solana.Unity.Programs;
1313
using Solana.Unity.Programs.Models;
1414
using Solana.Unity.Rpc.Core.Http;
@@ -50,7 +50,7 @@ public class AnchorService : MonoBehaviour
5050
private PublicKey PlayerDataPDA;
5151
private PublicKey GameDataPDA;
5252
private bool _isInitialized;
53-
private LumberjackClient anchorClient;
53+
private <%=className%>Client anchorClient;
5454
private int blockingTransactionsInProgress;
5555
private int nonBlockingTransactionsInProgress;
5656
private long? sessionValidUntil;
@@ -92,7 +92,7 @@ public class AnchorService : MonoBehaviour
9292

9393
FindPDAs(account);
9494

95-
anchorClient = new LumberjackClient(Web3.Rpc, Web3.WsRpc, AnchorProgramIdPubKey);
95+
anchorClient = new <%=className%>Client(Web3.Rpc, Web3.WsRpc, AnchorProgramIdPubKey);
9696

9797
await SubscribeToPlayerDataUpdates();
9898
await SubscribeToGameDataUpdates();
@@ -221,7 +221,7 @@ public class AnchorService : MonoBehaviour
221221
accounts.Signer = Web3.Account;
222222
accounts.SystemProgram = SystemProgram.ProgramIdKey;
223223

224-
var initTx = LumberjackProgram.InitPlayer(accounts, levelSeed, AnchorProgramIdPubKey);
224+
var initTx = <%=className%>Program.InitPlayer(accounts, levelSeed, AnchorProgramIdPubKey);
225225
tx.Add(initTx);
226226

227227
if (true)
@@ -336,7 +336,7 @@ public class AnchorService : MonoBehaviour
336336
transaction.FeePayer = sessionWallet.Account.PublicKey;
337337
chopTreeAccounts.Signer = sessionWallet.Account.PublicKey;
338338
chopTreeAccounts.SessionToken = sessionWallet.SessionTokenPDA;
339-
var chopInstruction = LumberjackProgram.ChopTree(chopTreeAccounts, levelSeed, transactionCounter, AnchorProgramIdPubKey);
339+
var chopInstruction = <%=className%>Program.ChopTree(chopTreeAccounts, levelSeed, transactionCounter, AnchorProgramIdPubKey);
340340
transaction.Add(chopInstruction);
341341
Debug.Log("Sign and send chop tree with session");
342342
await SendAndConfirmTransaction(sessionWallet, transaction, "Chop Tree with session.", isBlocking: false, onSucccess: onSuccess);
@@ -345,7 +345,7 @@ public class AnchorService : MonoBehaviour
345345
{
346346
transaction.FeePayer = Web3.Account.PublicKey;
347347
chopTreeAccounts.Signer = Web3.Account.PublicKey;
348-
var chopInstruction = LumberjackProgram.ChopTree(chopTreeAccounts, levelSeed, transactionCounter, AnchorProgramIdPubKey);
348+
var chopInstruction = <%=className%>Program.ChopTree(chopTreeAccounts, levelSeed, transactionCounter, AnchorProgramIdPubKey);
349349
transaction.Add(chopInstruction);
350350
Debug.Log("Sign and send init without session");
351351
await SendAndConfirmTransaction(Web3.Wallet, transaction, "Chop Tree without session.", onSucccess: onSuccess);

packages/preset-lumberjack/src/generators/preset/files/unity/__className__/Assets/Game/Scripts/Ui/GameScreen.cs.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ using System.Collections;
33
using Cysharp.Threading.Tasks;
44
using DG.Tweening;
55
using Frictionless;
6-
using Lumberjack.Accounts;
6+
using <%=className%>.Accounts;
77
using Solana.Unity.SDK;
88
using Services;
99
using TMPro;

packages/preset-lumberjack/src/generators/preset/files/unity/__className__/Assets/Game/Scripts/Ui/LoginScreen.cs.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using System;
2-
using Lumberjack.Accounts;
2+
using <%=className%>.Accounts;
33
using Solana.Unity.SDK;
44
using Solana.Unity.Wallet.Bip39;
55
using UnityEngine;

packages/preset-lumberjack/src/generators/preset/files/unity/__className__/UserSettings/Layouts/default-2021.dwlt.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ MonoBehaviour:
308308
m_SerializedViewNames:
309309
- UnityEditor.GameView
310310
m_SerializedViewValues:
311-
- /Users/jonasmac2/Documents/GitHub/solana_game_preset/unity/Lumberjack/Library/PlayModeViewStates/abd5aa5f5622b494fbdcf239ede413d8
311+
- /Users/jonasmac2/Documents/GitHub/solana_game_preset/unity/<%=className%>/Library/PlayModeViewStates/abd5aa5f5622b494fbdcf239ede413d8
312312
m_PlayModeViewName: Device Simulator
313313
m_ShowGizmos: 0
314314
m_TargetDisplay: 0
@@ -385,7 +385,7 @@ MonoBehaviour:
385385
m_LastFolders:
386386
- Assets/Game/Prefabs
387387
m_LastFoldersGridSize: 16
388-
m_LastProjectPath: /Users/jonasmac2/Documents/GitHub/solana_game_preset/unity/Lumberjack
388+
m_LastProjectPath: /Users/jonasmac2/Documents/GitHub/solana_game_preset/unity/<%=className%>
389389
m_LockTracker:
390390
m_IsLocked: 0
391391
m_FolderTreeState:

0 commit comments

Comments
 (0)