-
Notifications
You must be signed in to change notification settings - Fork 19
✨ Components & Systems Bundle #207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
c193151
93e1cc9
967a6f8
ab2e96d
60e0e09
6c7fc4a
a811ba1
d477fbc
a5bff8c
1c65d67
e513974
00293e8
d92321c
9b704a6
7724f75
5a436ff
78dfee9
1815bdb
ed09640
73a7a80
cad9c49
256a21e
e4c3b1f
54aa63e
62eb831
4300bda
108e3e2
b73a997
4d0f86c
0d4e772
c656e91
5099cc2
c36b070
1d21cbe
f8d20db
9c16005
777049f
910d4c3
8e0ca48
aa70fc5
c3a1583
46aaf7e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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) { | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -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
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||
| await framework.SendAndConfirmInstruction(framework.AcceleratorClient, instruction); | ||||||||||||||||||||||||||||||||||||||||||||||
| await Task.Delay(50); | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify that
bolt-attribute-bolt-bundlepackage is properly configured in the workspace.The new package is added to the crates.io publish list. Confirm that:
bolt-attribute-bolt-bundleexists in the Cargo workspace and is included in workspace members.Cargo.tomlconfiguration (name, version, publish settings, etc.).🏁 Script executed:
Length of output: 518
bolt-attribute-bolt-bundleis not configured in the workspace and must be added before publishing.The package does not exist in the workspace members list. Verification shows:
Cargo.tomlworkspace members (only "crates/bolt-cli", "crates/bolt-lang", "crates/programs/world", "crates/types", and "examples/*" are present)Before adding this package to the publish workflow, you must:
membersarray in the rootCargo.tomlCargo.tomlis properly configured with name, version, and publish settings🤖 Prompt for AI Agents