Skip to content

Commit

Permalink
update-before-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
crypto-vincent committed Jun 14, 2024
1 parent 09d4052 commit cbdcd22
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 20 deletions.
12 changes: 10 additions & 2 deletions Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ skip-lint = false
world = "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"

[programs.localnet]
world = "WorLD15A7CrDwLcLy4fRqtaTb9fbd8o8iqiEMUDse2n"
bolt-component = "CmP2djJgABZ4cRokm4ndxuq6LerqpNHLBsaUv2XKEJua"
bolt-system = "7X4EFsDJ5aYTcEjKzJ94rD8FRKgQeXC89fkpeTS4KaqP"
position = "Fn1JzzEdyb55fsyduWS94mYHizGhJZuhvjX6DVvrmGbQ"
Expand All @@ -30,7 +29,16 @@ shutdown_wait = 2000
upgradeable = false

[workspace]
members = ["programs/bolt-component", "programs/bolt-system", "programs/world", "examples/component-position", "examples/component-velocity", "examples/system-apply-velocity", "examples/system-fly", "examples/system-simple-movement"]
members = [
"programs/bolt-component",
"programs/bolt-system",
"programs/world",
"examples/component-position",
"examples/component-velocity",
"examples/system-apply-velocity",
"examples/system-fly",
"examples/system-simple-movement",
]

[[test.genesis]]
address = "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh"
Expand Down
2 changes: 1 addition & 1 deletion clients/bolt-sdk/src/world/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export async function ApplySystem({
systemId,
entities,
extraAccounts,
args = {},
args,
}: {
authority: PublicKey;
systemId: PublicKey;
Expand Down
34 changes: 17 additions & 17 deletions tests/bolt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,27 +50,27 @@ function padCenter(value: string, width: number) {
}

function logPosition(title: string, { x, y, z }: { x: BN; y: BN; z: BN }) {
console.log("+----------------------------+");
console.log(`| ${padCenter(title, 20)} |`);
console.log("+---------------+------------+");
console.log(`| X Position | ${String(x).padEnd(10, " ")} |`);
console.log(`| Y Position | ${String(y).padEnd(10, " ")} |`);
console.log(`| Z Position | ${String(z).padEnd(10, " ")} |`);
console.log("+---------------+------------+");
console.log(" +----------------------------+");
console.log(` | ${padCenter(title, 26)} |`);
console.log(" +---------------+------------+");
console.log(` | X Position | ${String(x).padEnd(10, " ")} |`);
console.log(` | Y Position | ${String(y).padEnd(10, " ")} |`);
console.log(` | Z Position | ${String(z).padEnd(10, " ")} |`);
console.log(" +---------------+------------+");
}

function logVelocity(
title: string,
{ x, y, z, lastApplied }: { x: BN; y: BN; z: BN; lastApplied: BN }
) {
console.log("+----------------------------+");
console.log(`| ${padCenter(title, 20)} |`);
console.log("+---------------+------------+");
console.log(`| X Velocity | ${String(x).padEnd(10, " ")} |`);
console.log(`| Y Velocity | ${String(y).padEnd(10, " ")} |`);
console.log(`| Z Velocity | ${String(z).padEnd(10, " ")} |`);
console.log(`| Last Applied | ${String(lastApplied).padEnd(10, " ")} |`);
console.log("+---------------+------------+");
console.log(" +----------------------------+");
console.log(` | ${padCenter(title, 26)} |`);
console.log(" +---------------+------------+");
console.log(` | X Velocity | ${String(x).padEnd(10, " ")} |`);
console.log(` | Y Velocity | ${String(y).padEnd(10, " ")} |`);
console.log(` | Z Velocity | ${String(z).padEnd(10, " ")} |`);
console.log(` | Last Applied | ${String(lastApplied).padEnd(10, " ")} |`);
console.log(" +---------------+------------+");
}

describe("bolt", () => {
Expand Down Expand Up @@ -184,7 +184,7 @@ describe("bolt", () => {
const inititializeComponent = await InitializeComponent({
payer: provider.wallet.publicKey,
entity: entity1Pda,
//seed: "origin-component",
seed: "origin-component",
componentId: boltComponentProgram.programId,
});
await provider.sendAndConfirm(inititializeComponent.transaction);
Expand All @@ -194,7 +194,7 @@ describe("bolt", () => {
const inititializeComponent = await InitializeComponent({
payer: provider.wallet.publicKey,
entity: entity2Pda,
//seed: "origin-component",
seed: "origin-component",
componentId: boltComponentProgram.programId,
});
await provider.sendAndConfirm(inititializeComponent.transaction);
Expand Down

0 comments on commit cbdcd22

Please sign in to comment.