Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
c193151
:sparkles: Client-side TS & C# code for ECS bundle
notdanilo Sep 24, 2025
93e1cc9
:sparkles: 'Adding bolt bundle <name>'
notdanilo Sep 24, 2025
967a6f8
:construction: #[bundle] implementation placeholder
notdanilo Sep 24, 2025
ab2e96d
:recycle: WIP - Refactoring #[component]
notdanilo Sep 24, 2025
60e0e09
:recycle: Moving component instructions implementation to bolt-lang
notdanilo Sep 25, 2025
6c7fc4a
:construction: #[bundle] working with #[components]s
notdanilo Sep 26, 2025
a811ba1
:recycle: Moving #[system] implementation to bolt-attribute
notdanilo Sep 30, 2025
d477fbc
:recycle: Making #[system] functions and structures names unique in #…
notdanilo Sep 30, 2025
a5bff8c
:recycle: Fixing components seeds for bundled components
notdanilo Sep 30, 2025
1c65d67
:sparkles: Support bundled #[system]
notdanilo Oct 1, 2025
e513974
:sparkles: C# client support for bundle components and systems
notdanilo Oct 1, 2025
00293e8
:rotating_light: Applying linter suggestions
notdanilo Oct 1, 2025
d92321c
:recycle: Fixing component Delegation
notdanilo Oct 1, 2025
9b704a6
:recycle: Reworked TypeScript Components API
notdanilo Oct 2, 2025
7724f75
:recycle: Removing bolt-component and bolt-system
notdanilo Oct 2, 2025
5a436ff
:recycle: Fixing getMethodDiscriminator
notdanilo Oct 2, 2025
78dfee9
:recycle: Reworking delegation gen macro and making it available for …
notdanilo Oct 4, 2025
1815bdb
:rotating_light: Fixing linter warnings
notdanilo Oct 4, 2025
ed09640
:recycle: Fixing component update discriminator
notdanilo Oct 4, 2025
73a7a80
:sparkles: C# client for components and systems bundles
notdanilo Oct 6, 2025
cad9c49
:recycle: Making apply system API retro-compatible
notdanilo Oct 8, 2025
256a21e
:sparkles: Bundled components are optionally delegateable
notdanilo Oct 9, 2025
e4c3b1f
:rotating_light: Fixing linter warnings
notdanilo Oct 9, 2025
54aa63e
:recycle: Applying requested changes
notdanilo Oct 9, 2025
62eb831
:recycle: Adding compile-time guarantees for discriminator calculation
notdanilo Oct 13, 2025
4300bda
:rotating_light: Fixing linter warnings
notdanilo Oct 13, 2025
108e3e2
:recycle: Assigning discriminator_for to a constant
notdanilo Oct 13, 2025
b73a997
:recycle: Making discriminators constants global
notdanilo Oct 13, 2025
4d0f86c
:recycle: Removing unused BuildVecOfBytes
notdanilo Oct 14, 2025
0d4e772
:recycle: Adding guards to InitializeComponent.cs
notdanilo Oct 14, 2025
c656e91
:bug: Fixing account:name discriminator
notdanilo Oct 14, 2025
5099cc2
:bug: Fixing seed order in TS client
notdanilo Oct 15, 2025
c36b070
:recycle: Replacing uwnrap with more informational expects
notdanilo Oct 15, 2025
1d21cbe
:recycle: Adding checks to BoltMetadata partial deserialization
notdanilo Oct 15, 2025
f8d20db
:recycle: Getting rid of unnecessary clone
notdanilo Oct 15, 2025
9c16005
:recycle: Keeping is_signer and is_writable in AccountMeta
notdanilo Oct 15, 2025
777049f
:recycle: Enforcing authority signature check on systems
notdanilo Oct 15, 2025
910d4c3
:rotating_light: Fixing linter warnings
notdanilo Oct 15, 2025
8e0ca48
:recycle: Making API retro-compatible
notdanilo Oct 20, 2025
aa70fc5
:rotating_light: Fixing linter warnings
notdanilo Oct 23, 2025
c3a1583
:recycle: Supporting multiple #[extra_accounts]
notdanilo Oct 28, 2025
46aaf7e
:white_check_mark: Adding EXAMPLE_BUNDLE to secrets
notdanilo Nov 3, 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
7 changes: 2 additions & 5 deletions .github/workflows/publish-bolt-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ jobs:
echo ${{ secrets.SYSTEM_APPLY_VELOCITY }} > target/deploy/system_apply_velocity-keypair.json
echo ${{ secrets.SYSTEM_FLY }} > target/deploy/system_fly-keypair.json
echo ${{ secrets.SYSTEM_SIMPLE_MOVEMENT }} > target/deploy/system_simple_movement-keypair.json

echo ${{ secrets.EXAMPLE_BUNDLE }} > target/deploy/example_bundle-keypair.json
- name: Check versions are aligned
run: |
# Fails if versions are not aligned
Expand Down Expand Up @@ -180,15 +180,12 @@ jobs:
-p bolt-cli \
-p bolt-lang \
-p bolt-utils \
-p bolt-system \
-p bolt-component \
-p bolt-attribute-bolt-arguments \
-p bolt-attribute-bolt-bundle \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify that bolt-attribute-bolt-bundle package is properly configured in the workspace.

The new package is added to the crates.io publish list. Confirm that:

  1. bolt-attribute-bolt-bundle exists in the Cargo workspace and is included in workspace members.
  2. The package has proper Cargo.toml configuration (name, version, publish settings, etc.).
  3. The package is ready for public release on crates.io.

🏁 Script executed:

#!/bin/bash
# Description: Verify bolt-attribute-bolt-bundle package exists and is configured
# Expected: Package directory exists and Cargo.toml is properly configured

# Find the package
fd -t d 'bolt-attribute-bolt-bundle' --max-depth 2

# Check workspace configuration
rg -A 20 '^\[workspace\]' Cargo.toml | head -30

# Check if the package is listed in members
rg '"bolt-attribute-bolt-bundle"' Cargo.toml

Length of output: 518


bolt-attribute-bolt-bundle is not configured in the workspace and must be added before publishing.

The package does not exist in the workspace members list. Verification shows:

  • The package directory does not exist
  • The package is not listed in Cargo.toml workspace members (only "crates/bolt-cli", "crates/bolt-lang", "crates/programs/world", "crates/types", and "examples/*" are present)
  • The package is not referenced in workspace dependencies

Before adding this package to the publish workflow, you must:

  1. Create the package directory structure
  2. Add the package to the members array in the root Cargo.toml
  3. Ensure its Cargo.toml is properly configured with name, version, and publish settings
🤖 Prompt for AI Agents
.github/workflows/publish-bolt-crates.yml around line 184: the workflow
references a package name "bolt-attribute-bolt-bundle" that does not exist in
the workspace; create the missing crate and register it before including it in
the publish step — create the package directory (e.g.,
crates/bolt-attribute-bolt-bundle) with a valid Cargo.toml, add the new package
name to the root Cargo.toml workspace.members array, ensure the crate's
Cargo.toml contains the correct package name, version, edition and publish
settings (and any workspace dependency entries if required), then re-run or
update the workflow entry to reference the newly added workspace member.

-p bolt-attribute-bolt-component \
-p bolt-attribute-bolt-component-deserialize \
-p bolt-attribute-bolt-component-id \
-p bolt-attribute-bolt-delegate \
-p bolt-attribute-bolt-extra-accounts \
-p bolt-attribute-bolt-program \
-p bolt-attribute-bolt-system \
-p bolt-attribute-bolt-system-input
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-bolt-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:
echo ${{ secrets.SYSTEM_APPLY_VELOCITY }} > target/deploy/system_apply_velocity-keypair.json
echo ${{ secrets.SYSTEM_FLY }} > target/deploy/system_fly-keypair.json
echo ${{ secrets.SYSTEM_SIMPLE_MOVEMENT }} > target/deploy/system_simple_movement-keypair.json

echo ${{ secrets.EXAMPLE_BUNDLE }} > target/deploy/example_bundle-keypair.json
- name: Check versions are aligned
run: |
# Fails if versions are not aligned
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:
echo ${{ secrets.SYSTEM_APPLY_VELOCITY }} > target/deploy/system_apply_velocity-keypair.json
echo ${{ secrets.SYSTEM_FLY }} > target/deploy/system_fly-keypair.json
echo ${{ secrets.SYSTEM_SIMPLE_MOVEMENT }} > target/deploy/system_simple_movement-keypair.json
echo ${{ secrets.EXAMPLE_BUNDLE }} > target/deploy/example_bundle-keypair.json

- name: Run Build and Tests
run: |
Expand Down
5 changes: 2 additions & 3 deletions Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ skip-lint = false
world = "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"

[programs.localnet]
bolt-component = "CmP2djJgABZ4cRokm4ndxuq6LerqpNHLBsaUv2XKEJua"
bolt-system = "7X4EFsDJ5aYTcEjKzJ94rD8FRKgQeXC89fkpeTS4KaqP"
component-small = "9yBADAhoTWCkNRB6hbfpwUgPpxyJiF9uEiWVPR6k7A4y"
escrow-funding = "4Um2d8SvyfWyLLtfu2iJMFhM77DdjjyQusEy7K3VhPkd"
example-bundle = "CgfPBUeDUL3GT6b5AUDFE56KKgU4ycWA9ERjEWsfMZCj"
position = "Fn1JzzEdyb55fsyduWS94mYHizGhJZuhvjX6DVvrmGbQ"
system-apply-velocity = "6LHhFVwif6N9Po3jHtSmMVtPjF6zRfL3xMosSzcrQAS8"
system-fly = "HT2YawJjkNmqWcLNfPAMvNsLdWwPvvvbKA5bpMw4eUpq"
Expand All @@ -36,7 +35,7 @@ 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", "examples/component-small", "examples/system-with-1-component", "examples/system-with-2-components", "examples/system-with-3-components", "examples/system-with-4-components", "examples/system-with-5-components", "examples/system-with-6-components", "examples/system-with-7-components", "examples/system-with-8-components", "examples/system-with-9-components", "examples/system-with-10-components", "examples/escrow-funding"]
members = ["crates/programs/world", "examples/component-position", "examples/component-velocity", "examples/system-apply-velocity", "examples/system-fly", "examples/system-simple-movement", "examples/component-small", "examples/system-with-1-component", "examples/system-with-2-components", "examples/system-with-3-components", "examples/system-with-4-components", "examples/system-with-5-components", "examples/system-with-6-components", "examples/system-with-7-components", "examples/system-with-8-components", "examples/system-with-9-components", "examples/system-with-10-components", "examples/escrow-funding", "examples/bundle"]

[scripts]
test = "tests/script.sh"
Expand Down
83 changes: 47 additions & 36 deletions Cargo.lock

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

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ resolver = "2"
members = [
"crates/bolt-cli",
"crates/bolt-lang",
"crates/programs/bolt-component",
"crates/programs/bolt-system",
"crates/programs/world",
"crates/types",
"examples/*",
Expand All @@ -21,8 +19,9 @@ edition = "2021"
[workspace.dependencies]
bolt-types = { path = "crates/types", version = "=0.2.6" }
bolt-lang = { path = "crates/bolt-lang", version = "=0.2.6" }
bolt-attribute = { path = "crates/bolt-lang/attribute", version = "=0.2.6" }
bolt-attribute-bolt-bundle = { path = "crates/bolt-lang/attribute/bundle", version = "=0.2.6" }
bolt-attribute-bolt-program = { path = "crates/bolt-lang/attribute/bolt-program", version = "=0.2.6" }
bolt-attribute-bolt-delegate = { path = "crates/bolt-lang/attribute/delegate", version = "=0.2.6" }
bolt-attribute-bolt-component = { path = "crates/bolt-lang/attribute/component", version = "=0.2.6" }
bolt-attribute-bolt-system = { path = "crates/bolt-lang/attribute/system", version = "=0.2.6"}
bolt-attribute-bolt-system-input = { path = "crates/bolt-lang/attribute/system-input", version = "=0.2.6" }
Expand All @@ -32,9 +31,8 @@ bolt-attribute-bolt-component-deserialize = { path = "crates/bolt-lang/attribute
bolt-attribute-bolt-component-id = { path = "crates/bolt-lang/attribute/component-id", version = "=0.2.6" }
bolt-utils = { path = "crates/bolt-lang/utils", version = "=0.2.6" }
world = { path = "crates/programs/world", features = ["cpi"], version = "=0.2.6"}
bolt-system = { path = "crates/programs/bolt-system", features = ["cpi"], version = "=0.2.6"}
bolt-component = { path = "crates/programs/bolt-component", features = ["cpi"], version = "=0.2.6"}
small = { path = "examples/component-small", features = ["cpi"], version = "=0.2.6"}
component-large = { path = "examples/component-large", features = ["cpi"], version = "=0.2.6"}

## External crates
session-keys = { version = "^2", features = ["no-entrypoint"] }
Expand Down Expand Up @@ -63,6 +61,8 @@ which = "^7"
tokio = { version = "^1", features = ["full"] }
sysinfo = "=0.36.1"
bytemuck_derive = "^1"
const-crypto = "0.3.0"
sha2 = "^0.10"

[profile.release]
overflow-checks = true
Expand Down
20 changes: 12 additions & 8 deletions clients/csharp/Solana.Unity.Bolt.Test/AccelerationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
using World.Program;
using System.Diagnostics;
using Solana.Unity.Rpc.Types;
using Bolt;

namespace AccelerationTest {
public class Test {
public static async Task Run(Framework framework) {
Expand Down Expand Up @@ -45,14 +47,16 @@ public static async Task DelegateComponent(Framework framework) {

public static async Task ApplySimpleMovementSystemOnAccelerator(Framework framework) {
for (int i = 0; i < 10; i++) {
var apply = new ApplyAccounts() {
Authority = framework.Wallet.Account.PublicKey,
BoltSystem = framework.SystemSimpleMovement,
World = framework.WorldPda,
};
var instruction = WorldProgram.Apply(apply, Bolt.World.SerializeArgs(new { direction = "Up" }));
instruction.Keys.Add(AccountMeta.ReadOnly(framework.ExampleComponentPosition, false));
instruction.Keys.Add(AccountMeta.Writable(framework.AccelerationComponentPositionPda, false));
var instruction = Bolt.World.ApplySystem(
framework.WorldPda,
framework.SystemSimpleMovement,
new Bolt.World.EntityType[] {
new Bolt.World.EntityType(framework.AccelerationEntityPda,
new PublicKey[] { framework.ExampleComponentPosition })
},
Bolt.World.SerializeArgs(new { direction = "Up" }),
framework.Wallet.Account.PublicKey
);
Comment on lines +50 to +59
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Prefer the object-args overload; avoid manual serialization.

Use the ApplySystem overload that accepts object args to remove explicit SerializeArgs and reduce call-site errors.

-                var instruction = Bolt.World.ApplySystem(
+                var instruction = Bolt.World.ApplySystem(
                     framework.WorldPda,
                     framework.SystemSimpleMovement,
                     new Bolt.World.EntityType[] {
                         new Bolt.World.EntityType(framework.AccelerationEntityPda,
                         new PublicKey[] { framework.ExampleComponentPosition })
                     },
-                    Bolt.World.SerializeArgs(new { direction = "Up" }),
+                    new { direction = "Up" },
                     framework.Wallet.Account.PublicKey
                 );

If you’re migrating this path to bundled systems soon, consider the System-based overload to auto-handle discriminators and remaining accounts.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
var instruction = Bolt.World.ApplySystem(
framework.WorldPda,
framework.SystemSimpleMovement,
new Bolt.World.EntityType[] {
new Bolt.World.EntityType(framework.AccelerationEntityPda,
new PublicKey[] { framework.ExampleComponentPosition })
},
Bolt.World.SerializeArgs(new { direction = "Up" }),
framework.Wallet.Account.PublicKey
);
var instruction = Bolt.World.ApplySystem(
framework.WorldPda,
framework.SystemSimpleMovement,
new Bolt.World.EntityType[] {
new Bolt.World.EntityType(
framework.AccelerationEntityPda,
new PublicKey[] { framework.ExampleComponentPosition }
)
},
new { direction = "Up" },
framework.Wallet.Account.PublicKey
);
🤖 Prompt for AI Agents
In clients/csharp/Solana.Unity.Bolt.Test/AccelerationTest.cs around lines 50 to
59, the call to Bolt.World.ApplySystem manually serializes arguments with
Bolt.World.SerializeArgs(new { direction = "Up" }); change this to the
ApplySystem overload that accepts object args directly (pass new { direction =
"Up" } without SerializeArgs) so serialization is handled by the API and reduces
call-site errors; if you plan to migrate to bundled systems soon, consider using
the System-based overload which will auto-handle discriminators and remaining
accounts.

await framework.SendAndConfirmInstruction(framework.AcceleratorClient, instruction);
await Task.Delay(50);
}
Expand Down
Loading