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

Program Optimization - Updated Program Architecture lesson #485

Conversation

0xCipherCoder
Copy link
Contributor

Problem

Summary of Changes

  • Updated code snippets with the latest anchor version
  • Fixed content with updated version changes
  • Fixed grammar and styling
  • Fixed as per guidelines
  • Fixed order of content based on real-time code following tutorial.

Fixes #

Unboxed PRs
Main solution - Unboxed-Software/anchor-rpg#6
Challenge solution - Unboxed-Software/anchor-rpg#7

Copy link
Collaborator

@mikemaccana mikemaccana left a comment

Choose a reason for hiding this comment

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

Excellent work, some small and medium (mainly around resizing) fixes needed. See comments.

#[derive(AnchorSerialize, AnchorDeserialize, Clone, InitSpace)]
pub struct GameConfig {
pub max_items_per_player: u8,
pub for_future_use: [u64; 16], // Health of Enemies? Experience per item? Action Points per Action?
Copy link
Collaborator

Choose a reason for hiding this comment

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

Again double check re: account resizing. We might want to focus more on resizing and completely delete the concept of saving space for future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes removed these and added details on resizing using realloc with backward compatibility.

@0xCipherCoder
Copy link
Contributor Author

Excellent work, some small and medium (mainly around resizing) fixes needed. See comments.

Thanks! @mikemaccana I have updated content as per comments and resolved comments. Please review and let me know if there is any additional feedback.

@mikemaccana
Copy link
Collaborator

mikemaccana commented Sep 30, 2024

Can you please resolve the recent conflicts? But yes this looks good.

@0xCipherCoder
Copy link
Contributor Author

Can you please resolve the recent conflicts? But yes this looks good.

Thanks! @mikemaccana I have resolved the conflicts. Please check.

@mikemaccana mikemaccana self-requested a review October 4, 2024 05:25
@mikemaccana mikemaccana merged commit 8de89f2 into solana-foundation:main Oct 4, 2024
10 checks passed
adpthegreat pushed a commit to adpthegreat/developer-content that referenced this pull request Oct 23, 2024
…undation#485)

* Fixed links

* Updated content and code snippets

* Fixed grammar mistake

* Fixed content and formatting as per comments

* Added realloc related changes for account resizing

* Updated content as per comment and realloc constraint
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.

2 participants