Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
22b314f
:construction_worker: Adding CU measurement
notdanilo Aug 13, 2025
f665350
:white_check_mark: Adding CU measurement in tests
notdanilo Aug 21, 2025
34cd897
:construction_worker: Adding CU measurement
notdanilo Aug 13, 2025
5d1a601
:construction: WIP - System directly updates components
notdanilo Aug 6, 2025
08ae658
:construction: on-chain component serialization
notdanilo Aug 7, 2025
82a06bb
:recycle: Authority & Session checks
notdanilo Aug 13, 2025
6d51b71
:recycle: Updating C# client
notdanilo Aug 13, 2025
d61ca02
:fire: Removing unnecessary test
notdanilo Aug 13, 2025
36373a1
:bug: Fixing authority account mutability
notdanilo Aug 13, 2025
10deb95
:fire: Removing CU test for whitelisting
notdanilo Aug 13, 2025
9a86ff4
:recycle: Hardcoding known CPI Auth PDA
notdanilo Aug 14, 2025
e777ffe
:recycle: Small optimizations
notdanilo Aug 14, 2025
78ac3ca
:rotating_light: Fixing linter warnings
notdanilo Aug 14, 2025
8da2dd8
:fire: Removing debug print
notdanilo Aug 14, 2025
ec8387f
:memo: Adding docs about CPI Auth PDA seeds
notdanilo Aug 18, 2025
9ac0e85
:bug: Fixed case where the same component is used more than once in t…
notdanilo Aug 21, 2025
50355ed
:recycle: Optimizing apply_impl with less Vecs
notdanilo Aug 28, 2025
f9f5f99
:white_check_mark: Making entities/components unique in the tests
notdanilo Aug 21, 2025
468b49d
:recycle: Authority & Session checks
notdanilo Aug 13, 2025
d82d9c2
:bug: Fixed case where the same time is used more than once in the sy…
notdanilo Aug 21, 2025
82575bd
:construction: Giving components ownership to World
notdanilo Aug 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vscode
.idea*
.idea
.anchor
Expand Down
23 changes: 9 additions & 14 deletions Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,25 @@ world = "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"
[programs.localnet]
bolt-component = "CmP2djJgABZ4cRokm4ndxuq6LerqpNHLBsaUv2XKEJua"
bolt-system = "7X4EFsDJ5aYTcEjKzJ94rD8FRKgQeXC89fkpeTS4KaqP"
component-large = "FJjiJoz799Q6NqYffXbsFFj1pBmwsQZgcoizCfWvM5HX"
component-small = "9yBADAhoTWCkNRB6hbfpwUgPpxyJiF9uEiWVPR6k7A4y"
position = "Fn1JzzEdyb55fsyduWS94mYHizGhJZuhvjX6DVvrmGbQ"
system-apply-velocity = "6LHhFVwif6N9Po3jHtSmMVtPjF6zRfL3xMosSzcrQAS8"
system-fly = "HT2YawJjkNmqWcLNfPAMvNsLdWwPvvvbKA5bpMw4eUpq"
system-simple-movement = "FSa6qoJXFBR3a7ThQkTAMrC15p6NkchPEjBdd4n6dXxA"
system-with-few-components = "A3kNNSgmkTNA5V1qtnrbtNeqKrYHNxUMCTkqTDaQzE97"
system-with-many-components = "Hi4sMEb3uXhWCiLyrF7t3Z384an7YZsTj774cabAAPQB"
velocity = "CbHEFbSQdRN4Wnoby9r16umnJ1zWbULBHg4yqzGQonU1"

[registry]
url = "https://api.apr.dev"

[provider]
cluster = "Localnet"
cluster = "localnet"
wallet = "./tests/fixtures/provider.json"

[workspace]
members = [
"crates/programs/bolt-component",
"crates/programs/bolt-system",
"crates/programs/world",
"examples/component-position",
"examples/component-velocity",
"examples/system-apply-velocity",
"examples/system-fly",
"examples/system-simple-movement"
]
members = ["crates/programs/bolt-component", "crates/programs/bolt-system", "crates/programs/world", "examples/component-position", "examples/component-velocity", "examples/system-apply-velocity", "examples/system-fly", "examples/system-simple-movement", "examples/system-with-many-components", "examples/system-with-few-components", "examples/component-large", "examples/component-small"]

[scripts]
test = "tests/script.sh"
Expand All @@ -49,8 +44,8 @@ program = "tests/fixtures/delegation.so"
upgradeable = false

[[test.genesis]]
address="KeyspM2ssCJbqUhQ4k7sveSiY4WjnYsrXkC8oDbwde5"
program="tests/fixtures/session_keys.so"
address = "KeyspM2ssCJbqUhQ4k7sveSiY4WjnYsrXkC8oDbwde5"
program = "tests/fixtures/session_keys.so"
upgradeable = false

[test.validator]
Expand All @@ -76,4 +71,4 @@ filename = "tests/fixtures/vault1.json"

[[test.validator.account]]
address = "7JrkjmZPprHwtuvtuGTXp9hwfGYFAQLnLeFM52kqAgXg"
filename = "tests/fixtures/vault2.json"
filename = "tests/fixtures/vault2.json"
37 changes: 37 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ bolt-utils = { path = "crates/bolt-lang/utils", version = "=0.2.4" }
world = { path = "crates/programs/world", features = ["cpi"], version = "=0.2.4"}
bolt-system = { path = "crates/programs/bolt-system", features = ["cpi"], version = "=0.2.4"}
bolt-component = { path = "crates/programs/bolt-component", features = ["cpi"], version = "=0.2.4"}
component-large = { path = "examples/component-large", features = ["cpi"], version = "=0.2.4"}
component-small = { path = "examples/component-small", features = ["cpi"], version = "=0.2.4"}

## External crates
session-keys = { version = "^2", features = ["no-entrypoint"] }
Expand Down Expand Up @@ -62,6 +64,7 @@ which = "^7"
tokio = { version = "^1", features = ["full"] }
sysinfo = "^0"
bytemuck_derive = "^1"
sha2 = { version = "^0.10" }

[profile.release]
overflow-checks = true
Expand Down
2 changes: 2 additions & 0 deletions clients/csharp/Solana.Unity.Bolt.Test/ECSTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,11 @@ public static async Task CheckPositionOnEntity1IsDefault(Framework framework) {

public static async Task ApplySimpleMovementSystemUpOnEntity1(Framework framework) {
var apply = new ApplyAccounts() {
CpiAuth = WorldProgram.FindCpiAuthPda(),
Authority = framework.Wallet.Account.PublicKey,
BoltSystem = framework.SystemSimpleMovement,
World = framework.WorldPda,
Buffer = WorldProgram.FindBufferPda(framework.Wallet.Account.PublicKey),
};
var instruction = WorldProgram.Apply(apply, Bolt.World.SerializeArgs(new { direction = "Up" }));
instruction.Keys.Add(AccountMeta.ReadOnly(framework.ExampleComponentPosition, false));
Expand Down
3 changes: 2 additions & 1 deletion clients/csharp/Solana.Unity.Bolt.Test/Framework.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public async Task<string> SendAndConfirmInstruction(IRpcClient client, Transacti
.AddInstruction(instruction)
.Build(signers);

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public static async Task<DestroyComponentInstruction> DestroyComponent(PublicKey
public static async Task<DestroyComponentInstruction> DestroyComponent(PublicKey authority, PublicKey receiver, PublicKey entity, PublicKey componentProgram, PublicKey componentPda) {
var componentProgramData = WorldProgram.FindComponentProgramDataPda(componentProgram);
var destroyComponent = new DestroyComponentAccounts() {
CpiAuth = WorldProgram.FindCpiAuthPda(),
Authority = authority,
Receiver = receiver,
Entity = entity,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public static async Task<InitializeComponentInstruction> InitializeComponent(Pub

public static async Task<InitializeComponentInstruction> InitializeComponent(PublicKey payer, PublicKey entity, PublicKey componentId, PublicKey componentPda, PublicKey authority = null) {
var initializeComponent = new InitializeComponentAccounts() {
CpiAuth = WorldProgram.FindCpiAuthPda(),
Payer = payer,
Entity = entity,
Data = componentPda,
Expand Down
Loading