This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
solana_version: v1.18.8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Numerics; | |
using System.Threading.Tasks; | |
using Solana.Unity; | |
using Solana.Unity.Programs.Abstract; | |
using Solana.Unity.Programs.Utilities; | |
using Solana.Unity.Programs; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Solana.Unity.Rpc.Models.TransactionInstruction MovePiece(MovePieceAccounts accounts, Square from, Square to, PublicKey programId) | |
{ | |
List<Solana.Unity.Rpc.Models.AccountMeta> keys = new() | |
{Solana.Unity.Rpc.Models.AccountMeta.Writable(accounts.Payer, true), Solana.Unity.Rpc.Models.AccountMeta.Writable(accounts.User, false), Solana.Unity.Rpc.Models.AccountMeta.Writable(accounts.AdversaryUser, false), Solana.Unity.Rpc.Models.AccountMeta.Writable(accounts.Game, false), accounts.SessionToken != null ? Solana.Unity.Rpc.Models.AccountMeta.ReadOnly(accounts.SessionToken, false) : Solana.Unity.Rpc.Models.AccountMeta.ReadOnly(programId, false)}; | |
byte[] _data = new byte[1200]; | |
int offset = 0; | |
_data.WriteU64(5542210051077342600UL, offset); | |
offset += 8; | |
offset += from.Serialize(_data, offset); | |
offset += to.Serialize(_data, offset); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Solnet.Programs.Abstract; | |
using Solnet.Programs.Utilities; | |
using Solnet.Rpc; | |
using Solnet.Rpc.Core.Http; | |
using Solnet.Rpc.Core.Sockets; | |
using Solnet.Rpc.Types; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Numerics; | |
using System.Threading.Tasks; | |
using Solnet; | |
using Solnet.Programs.Abstract; | |
using Solnet.Programs.Utilities; | |
using Solnet.Rpc; | |
using Solnet.Rpc.Builders; |