Skip to content

Commit 2bf49ba

Browse files
committed
♻️ Updating C# client
1 parent fd5d415 commit 2bf49ba

File tree

7 files changed

+668
-642
lines changed

7 files changed

+668
-642
lines changed

clients/csharp/Solana.Unity.Bolt.Test/ECSTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,11 @@ public static async Task CheckPositionOnEntity1IsDefault(Framework framework) {
108108

109109
public static async Task ApplySimpleMovementSystemUpOnEntity1(Framework framework) {
110110
var apply = new ApplyAccounts() {
111+
CpiAuth = WorldProgram.CPI_AUTH_ADDRESS,
111112
Authority = framework.Wallet.Account.PublicKey,
112113
BoltSystem = framework.SystemSimpleMovement,
113114
World = framework.WorldPda,
115+
Buffer = WorldProgram.FindBufferPda(),
114116
};
115117
var instruction = WorldProgram.Apply(apply, Bolt.World.SerializeArgs(new { direction = "Up" }));
116118
instruction.Keys.Add(AccountMeta.ReadOnly(framework.ExampleComponentPosition, false));

clients/csharp/Solana.Unity.Bolt.Test/Framework.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public async Task<string> SendAndConfirmInstruction(IRpcClient client, Transacti
9696
.AddInstruction(instruction)
9797
.Build(signers);
9898

99-
var signature = await client.SendTransactionAsync(transaction, true, Commitment.Processed);
99+
var signature = await client.SendTransactionAsync(transaction, false, Commitment.Processed);
100100
var confirmed = await client.ConfirmTransaction(signature.Result, Commitment.Processed);
101101
if (signature.WasSuccessful && confirmed)
102102
{
@@ -107,6 +107,7 @@ public async Task<string> SendAndConfirmInstruction(IRpcClient client, Transacti
107107
if (signature.ErrorData != null) {
108108
errorMessage += "\n" + string.Join("\n", signature.ErrorData.Logs);
109109
}
110+
Console.WriteLine(errorMessage);
110111
throw new Exception(errorMessage);
111112
}
112113

clients/csharp/Solana.Unity.Bolt/WorldProgram/Bolt/DestroyComponent.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public static async Task<DestroyComponentInstruction> DestroyComponent(PublicKey
3030
public static async Task<DestroyComponentInstruction> DestroyComponent(PublicKey authority, PublicKey receiver, PublicKey entity, PublicKey componentProgram, PublicKey componentPda) {
3131
var componentProgramData = WorldProgram.FindComponentProgramDataPda(componentProgram);
3232
var destroyComponent = new DestroyComponentAccounts() {
33+
CpiAuth = WorldProgram.CPI_AUTH_ADDRESS,
3334
Authority = authority,
3435
Receiver = receiver,
3536
Entity = entity,

clients/csharp/Solana.Unity.Bolt/WorldProgram/Bolt/InitializeComponent.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public static async Task<InitializeComponentInstruction> InitializeComponent(Pub
3030

3131
public static async Task<InitializeComponentInstruction> InitializeComponent(PublicKey payer, PublicKey entity, PublicKey componentId, PublicKey componentPda, PublicKey authority = null) {
3232
var initializeComponent = new InitializeComponentAccounts() {
33+
CpiAuth = WorldProgram.CPI_AUTH_ADDRESS,
3334
Payer = payer,
3435
Entity = entity,
3536
Data = componentPda,

0 commit comments

Comments
 (0)