{"id":20858911,"url":"https://github.com/secretshardul/solana-anchor-tutorial","last_synced_at":"2026-04-20T18:33:24.525Z","repository":{"id":101006222,"uuid":"369758174","full_name":"secretshardul/solana-anchor-tutorial","owner":"secretshardul","description":null,"archived":false,"fork":false,"pushed_at":"2021-05-22T08:41:48.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-12T21:35:04.878Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/secretshardul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-22T08:39:15.000Z","updated_at":"2021-05-22T08:41:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/secretshardul/solana-anchor-tutorial","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/secretshardul/solana-anchor-tutorial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secretshardul%2Fsolana-anchor-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secretshardul%2Fsolana-anchor-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secretshardul%2Fsolana-anchor-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secretshardul%2Fsolana-anchor-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/secretshardul","download_url":"https://codeload.github.com/secretshardul/solana-anchor-tutorial/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/secretshardul%2Fsolana-anchor-tutorial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32059801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T04:47:58.773Z","updated_at":"2026-04-20T18:33:24.508Z","avatar_url":"https://github.com/secretshardul.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# solana-anchor-tutorial\n\n## Setup and CLI usage\n\n### 1. Prerequisites\n\n- `mocha` and `@project-serum/anchor` must be globally installed via `npm i -g mocha @project-serum/anchor`. Local installation doesn't work.\n- Run a local Solana node using `solana-test-validator`. Kill the validator and reuse the terminal for anchor commands.\n\n### 2. Intializing project\n\n1. Create project using `anchor init t1_basics`\n2. Build project and generate IDL using `anchor build`\n3. Deploy using `anchor deploy`\n4. Add new program to workspace using `anchor new program_name`\n\n### 3. Testing\n\nA test script is automatically created in tests folder.\n\n- Run all tests using `anchor test`\n- Run specific test using `anchor test tests/t2_accounts.js`\n\n## Program structure\n\n```\n```\n\n## Solala basics\n\n### Data storage\n\nData is stored on Solana in two ways:\n\n1. Accounts:\n    - They hold persistent arbitary data, similar to files in Linux.\n    - Also contain metadata, which controls write access.\n    - Accounts need to pay a rent otherwise they are purged. Paying tokens above an amount makes the account rent exempt.\n    - Design pattern: Store user data on accounts. Try to keep programs stateless.\n\n2.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecretshardul%2Fsolana-anchor-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsecretshardul%2Fsolana-anchor-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecretshardul%2Fsolana-anchor-tutorial/lists"}