Skip to content
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

✨ Adding low and intermediate api-levels #120

Merged
merged 11 commits into from
Jan 10, 2025
Merged

Conversation

notdanilo
Copy link
Contributor

@notdanilo notdanilo commented Dec 23, 2024

Status Type ⚠️ Core Change Issue
Hold Feature No #119

Problem & Solution

Are both described in the issue #119

This PR also

Includes: #58

Greptile Summary

This PR introduces API level abstractions (low/intermediate/high) to the Bolt framework and optimizes entity PDA generation for improved performance.

  • Changed entity PDA generation in clients/bolt-sdk/src/index.ts to use world.key instead of world.id to avoid unnecessary RPC calls
  • Added low-level API tests in tests/bolt.low-level.api.ts for direct Anchor interactions
  • Added intermediate-level API tests in tests/bolt.intermediate-level.api.ts with higher abstractions
  • Updated World program version from 0.1.12 to 0.2.0 in clients/bolt-sdk/src/generated/types/world.ts
  • Modified Anchor.toml test scripts to run both API level tests with proper timing

💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!

@notdanilo notdanilo force-pushed the feature/api-levels branch 2 times, most recently from 398c4a4 to 37d38c3 Compare January 7, 2025 16:39
@notdanilo notdanilo changed the title feature(api): adding low and intermediate api-levels ✨ Adding low and intermediate api-levels Jan 7, 2025
@notdanilo notdanilo marked this pull request as ready for review January 10, 2025 23:44
@notdanilo notdanilo merged commit 512d27b into main Jan 10, 2025
5 checks passed
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

11 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile

);
});

it("Initialize Original Component on Entity 2, trough the world instance", async () => {
Copy link

Choose a reason for hiding this comment

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

syntax: 'trough' is misspelled in the test name, should be 'through'

const signature = await provider.sendAndConfirm(transaction, [], {
skipPreflight: true,
});
console.log(`Whitelist 2 system approval signature: ${signature}`);
Copy link

Choose a reason for hiding this comment

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

logic: Log message refers to 'Whitelist 2' but this is the first whitelist operation

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

11 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile

}

// TODO: seed must be Uint8Array like the other FindPda functions
Copy link

Choose a reason for hiding this comment

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

logic: this TODO should be addressed before merging - inconsistent seed types between functions could lead to runtime errors

);
});

it("InitializeNewWorld 2", async () => {
Copy link

Choose a reason for hiding this comment

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

logic: The worldId and worldPda variables from the first world initialization are shadowed here, which could lead to state inconsistencies in subsequent tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant