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

onchain-development intro-to-anchor updated #349

Merged
merged 13 commits into from
Oct 4, 2024

Conversation

SAMAD101
Copy link
Contributor

@SAMAD101 SAMAD101 commented Aug 25, 2024

Summary of Changes

  • objectives section improvement
  • summary and lesson sections improved with more details
  • Anchor program structure and the proceeding parts improved with better details and clearer language
  • Context section updated
  • Instruction part updated
  • more improvements to other parts
  • added some more explanation to some topics for a better understanding
  • added explanation for the INIT_SPACE practice for space calculation in anchor.

@SAMAD101 SAMAD101 changed the title onchain-development intro-to-onchain updated onchain-development intro-to-anchor updated Aug 25, 2024
@mikemaccana mikemaccana changed the title onchain-development intro-to-anchor updated [superteam lesson updates] onchain-development intro-to-anchor updated Aug 26, 2024
@mikemaccana mikemaccana changed the title [superteam lesson updates] onchain-development intro-to-anchor updated [superteam] onchain-development intro-to-anchor updated Aug 26, 2024
@mikemaccana mikemaccana changed the title [superteam] onchain-development intro-to-anchor updated onchain-development intro-to-anchor updated Aug 26, 2024
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.

This needs a little work but should be good to go once the items above are addressed.

  • There's a few places where the old language is just vague or unnecessarily long. We should fix this. I've marked them and provided suggestions, but there may be more. Please look at the original article and try to simplify it as much as possible, anywhere you can.

  • Read up on INIT_SPACE https://www.anchor-lang.com/docs/space#the-init-space-macro

Also for "Before we begin, install Anchor by" - just link to 'local-setup.md' file instead, see CONTRIBUTING.md on how to make links.

@SAMAD101
Copy link
Contributor Author

This needs a little work but should be good to go once the items above are addressed.

* There's a few places where the old language is just vague or unnecessarily long. We should fix this. I've marked them and provided suggestions, but there may be more. Please look at the original article and try to simplify it as much as possible, anywhere you can.

* Read up on INIT_SPACE  https://www.anchor-lang.com/docs/space#the-init-space-macro

Also for "Before we begin, install Anchor by" - just link to 'local-setup.md' file instead, see CONTRIBUTING.md on how to make links.

aye ! on it !

@SAMAD101
Copy link
Contributor Author

I've made the changes and also went through the article once more to find and simplify some parts.

@SAMAD101
Copy link
Contributor Author

SAMAD101 commented Sep 4, 2024

This needs a little work but should be good to go once the items above are addressed.

* There's a few places where the old language is just vague or unnecessarily long. We should fix this. I've marked them and provided suggestions, but there may be more. Please look at the original article and try to simplify it as much as possible, anywhere you can.

* Read up on INIT_SPACE  https://www.anchor-lang.com/docs/space#the-init-space-macro

Also for "Before we begin, install Anchor by" - just link to 'local-setup.md' file instead, see CONTRIBUTING.md on how to make links.

I did the editing for this one. Let me know if anything is left.

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.

A few small suggestions to the old writing, plus some small tweaks - if you make them we can get this in today!

content/courses/onchain-development/intro-to-anchor.md Outdated Show resolved Hide resolved
content/courses/onchain-development/intro-to-anchor.md Outdated Show resolved Hide resolved
@@ -90,13 +105,20 @@ mod program_module_name {
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Formatting above looks odd, see CONTRIUBUTING.md

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it only appears like this in the diff window. I checked locally and on my github branch, its appears to be properly formatted there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

Copy link
Collaborator

Choose a reason for hiding this comment

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

I bet it's using a mix of tabs and spaces, and your local branch probably has some value set for tabs (2 spaces, 4 spaces, 8 spaces) that differs from what github uses. So yes it's a prob - please do fix it!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you show/tell me whats exactly out of place here, I didn't touch this part and it seems like it is formatted like everything Rust part in the file. Also used rustfmt as instructed in CONTRIBUTING.md, nothing changes.

content/courses/onchain-development/intro-to-anchor.md Outdated Show resolved Hide resolved
content/courses/onchain-development/intro-to-anchor.md Outdated Show resolved Hide resolved
content/courses/onchain-development/intro-to-anchor.md Outdated Show resolved Hide resolved
content/courses/onchain-development/intro-to-anchor.md Outdated Show resolved Hide resolved
content/courses/onchain-development/intro-to-anchor.md Outdated Show resolved Hide resolved
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.

Pardon the wait, we have a 24 person training course with new material then Rustconf then Breakpoint. See comments above.

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.

`#[derive(Accounts)]`). This implements an `Accounts` deserializer on the given
struct and removes the need to deserialize each account manually.
- Defines a structure of validated accounts for an instruction
- Makes accounts accessible through an instruction's `Context`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you please go through and fix usage of 'instruction handler' (for the function) versus 'instruction' (for the input to the function)? See CONTRIBUTING.md

Copy link
Contributor Author

@SAMAD101 SAMAD101 Oct 3, 2024

Choose a reason for hiding this comment

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

yes sure

So I have to correct the usage of instuction handler and instruction

Copy link
Contributor Author

Choose a reason for hiding this comment

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

did it

@mikemaccana mikemaccana merged commit 1e88515 into solana-foundation:main Oct 4, 2024
5 of 6 checks passed
@SAMAD101 SAMAD101 deleted the aoc-ita branch October 4, 2024 18:15
adpthegreat pushed a commit to adpthegreat/developer-content that referenced this pull request Oct 23, 2024
* onchain intro-to-onchain updated

* some refactors

* minor refactors

* minor refactors

* minor refactors

* Delete content/courses/onchain-development/temp.rs

* 'instruction handler' and 'instruction' terminology usage fixed

---------

Co-authored-by: Mike MacCana <mike.maccana@gmail.com>
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