{"id":19809842,"url":"https://github.com/danieljancar/stellar-smart-contract","last_synced_at":"2026-02-09T05:37:03.139Z","repository":{"id":253428229,"uuid":"843460110","full_name":"danieljancar/stellar-smart-contract","owner":"danieljancar","description":"A simple Stellar smart contract environment to get you started with Blockchain and Web 3.0. 🌱🔥","archived":false,"fork":false,"pushed_at":"2024-08-28T07:40:24.000Z","size":5,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-02-26T22:34:32.446Z","etag":null,"topics":["blockchain","rust","smart-contracts","stellar","tutorial"],"latest_commit_sha":null,"homepage":"https://rb.gy/k39yye","language":"Rust","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danieljancar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-08-16T15:04:25.000Z","updated_at":"2024-10-11T11:37:12.000Z","dependencies_parsed_at":"2025-01-11T06:44:39.076Z","dependency_job_id":"94cd0a7a-e9fb-444c-b715-53e3accdb103","html_url":"https://github.com/danieljancar/stellar-smart-contract","commit_stats":null,"previous_names":["danieljancar/stellar-smart-contract"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danieljancar/stellar-smart-contract","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieljancar%2Fstellar-smart-contract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieljancar%2Fstellar-smart-contract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieljancar%2Fstellar-smart-contract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieljancar%2Fstellar-smart-contract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danieljancar","download_url":"https://codeload.github.com/danieljancar/stellar-smart-contract/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danieljancar%2Fstellar-smart-contract/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270078326,"owners_count":24523349,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["blockchain","rust","smart-contracts","stellar","tutorial"],"created_at":"2024-11-12T09:18:27.005Z","updated_at":"2026-02-09T05:37:03.068Z","avatar_url":"https://github.com/danieljancar.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stellar Smart Contract Example\n\nFind the YouTube video tutorial [here](https://youtu.be/xLXAGWVP3f8).\n\nThis repository contains a basic example of a Stellar smart contract written in Rust. It includes all the necessary\ninstructions to build, deploy, and interact with the contract on the Stellar testnet.\n\n## Table of Contents\n\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Building the Contract](#building-the-contract)\n- [Set up local Source Account](#set-up-local-source-account)\n- [Deploying the Contract](#deploying-the-contract)\n- [Interacting with the Contract](#interacting-with-the-contract)\n    - [Saving a Value](#saving-a-value)\n    - [Getting a Value](#getting-a-value)\n- [Running Tests](#running-tests)\n- [Project Structure](#project-structure)\n- [License](#license)\n\n## Prerequisites\n\nBefore you begin, ensure you have the following tools installed:\n\n- **Rust**: The Rust programming language. You can install it using [rustup](https://rustup.rs/).\n- **Soroban CLI**: The Stellar CLI tool for working with smart\n  contracts. [Installation instructions](https://developers.stellar.org/docs/build/guides/cli).\n- **Cargo**: Rust's package manager, installed automatically with Rust.\n\n## Installation\n\n1. Clone the repository:\n\n    ```bash\n    git clone https://github.com/danieljancar/stellar-smart-contract.git\n    cd stellar-smart-contract\n    ```\n\n2. Install Rust (if you haven't already):\n\n    ```bash\n    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n    ```\n\n3. Install the Soroban CLI:\n\n    ```bash\n    cargo install soroban-cli\n    ```\n\n## Building the Contract\n\nTo build the smart contract, run the following command:\n\n```bash\nstellar contract build\n```\n\nThis command will compile the contract and generate a `contract.wasm` file in the `target/deploy` directory.\n\n## Set up local Source Account\n\nTo deploy the contract to the Stellar testnet, you need to set up a local source account. You can create a new account\nusing the following command:\n\n```bash\nstellar keys generate alice \\                                                                                                                              \n  --rpc-url https://horizon-testnet.stellar.org \\\n  --network-passphrase \"Test SDF Network ; September 2015\" \\\n  --network testnet\n```\n\n## Deploying the Contract\n\nTo deploy the smart contract to the Stellar testnet, run the following command:\n\n```bash\nstellar contract deploy \\\n  --wasm ./target/wasm32-unknown-unknown/release/stellar_smart_contract.wasm \\\n  --source-account alice \\\n  --network testnet\n```\n\nThis command will deploy the contract to the testnet and return the contract's address.\n\n## Interacting with the Contract\n\n### Saving a Value\n\nTo save a value to the contract, run the following command:\n\n```bash\nstellar contract invoke \\                                                                                                                   \n  --id \u003cYOUR_CONTRACT_ID\u003e \\\n  --source-account alice \\\n  --network testnet \\\n  -- \\\n  save_value --key \"brogramming_lang\" --value \"rust\"\n```\n\n### Getting a Value\n\nTo get a value from the contract, run the following command:\n\n```bash\nstellar contract invoke \\                                                                                                                            \n  --id \u003cYOUR_CONTRACT_ID\u003e \\\n  --source-account alice \\\n  --network testnet \\\n  -- \\\n  get_value --key \"brogramming_lang\"\n```\n\n## Running Tests\n\nTo run the tests, execute the following command:\n\n```bash\ncargo test\n```\n\n## Project Structure\n\nThe project is structured as follows:\n\n- `src/`: Contains the Rust source code for the smart contract and tests.\n- `Cargo.toml`: The project manifest file that contains dependencies and metadata.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanieljancar%2Fstellar-smart-contract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanieljancar%2Fstellar-smart-contract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanieljancar%2Fstellar-smart-contract/lists"}