{"id":29168341,"url":"https://github.com/mento-protocol/hackathon-demo","last_synced_at":"2025-07-01T10:07:05.828Z","repository":{"id":288144515,"uuid":"966830287","full_name":"mento-protocol/hackathon-demo","owner":"mento-protocol","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-15T18:53:02.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-15T19:45:52.749Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Solidity","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/mento-protocol.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,"zenodo":null}},"created_at":"2025-04-15T14:14:07.000Z","updated_at":"2025-04-15T18:53:05.000Z","dependencies_parsed_at":"2025-04-15T19:45:55.480Z","dependency_job_id":null,"html_url":"https://github.com/mento-protocol/hackathon-demo","commit_stats":null,"previous_names":["mento-protocol/hackathon-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mento-protocol/hackathon-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mento-protocol%2Fhackathon-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mento-protocol%2Fhackathon-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mento-protocol%2Fhackathon-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mento-protocol%2Fhackathon-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mento-protocol","download_url":"https://codeload.github.com/mento-protocol/hackathon-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mento-protocol%2Fhackathon-demo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262941557,"owners_count":23388150,"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","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":"2025-07-01T10:07:05.092Z","updated_at":"2025-07-01T10:07:05.818Z","avatar_url":"https://github.com/mento-protocol.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mento Demo\n\nThis repository contains a demo implementation of a contract that interacts with the Mento protocol on Celo to perform token swaps.\n\n## Setup\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/mento-protocol/hackathon-demo.git\ncd hackathon-demo\n```\n\n2. Install dependencies:\n\n```bash\nforge install\n```\n\n3. Set up environment variables:\n\n```bash\ncp .env.example .env\n```\n\n4. Add your private key to the .env file:\n\n```bash\n# For Celo mainnet RPC URL\nCELO_MAINNET_RPC_URL=\"https://forno.celo.org\"\n\n# For testnet RPC URL\nCELO_TESTNET_RPC_URL=\"https://alfajores-forno.celo-testnet.org\"\n\n# Your private key\nPRIVATE_KEY=\n\n# Celoscan API Key for verifying contracts\nCELOSCAN_API_KEY=\n```\n\n## Running Tests\n\nThe repository includes fork tests that interact with the actual Celo mainnet contracts.\n\n1. Run all tests:\n\n```bash\nforge test\n```\n\n## Deploying the Contract\n\nTo deploy the BrokerDemo contract to Celo mainnet:\n\n1. Set your private key in the .env file:\n\n```bash\nPRIVATE_KEY=your_private_key_here\n```\n\n2. Deploy the contract:\n\n```bash\nforge script deploy/DeployBrokerDemo.s.sol --rpc-url $RPC_URL --broadcast\n```\n\n3. Verify the contract:\n\n```bash\nforge verify-contract $CONTRACT_ADDRESS  --chain celo --rpc-url https://forno.celo.org\n```\n\n## Running the Demo Script\n\nThe repository includes a script that demonstrates the swap functionality by interacting with a deployed BrokerDemo contract.\n\n1. Update the script with your deployed contract address:\n\n   - Open `script/BrokerDemo.s.sol`\n   - Replace `BROKER_DEMO` constant with your deployed contract address\n\n2. Run the script:\n\n```bash\nforge script script/BrokerDemo.s.sol --rpc-url $CELO_MAINNET_RPC_URL --broadcast\n```\n\n## Contract Overview\n\nThe `BrokerDemo` contract provides a simple interface to swap cUSD for cEUR through the Mento protocol Router. It:\n\n1. Takes cUSD as input\n2. Swaps cUSD for USDC\n3. Swaps USDC for cEUR\n4. Returns cEUR to the user\n\n## Important Addresses\n\n- MentoRouter: `0xBE729350F8CdFC19DB6866e8579841188eE57f67`\n- BiPoolManager: `0x22d9db95E6Ae61c104A7B6F6C78D7993B94ec901`\n- cUSD: `0x765DE816845861e75A25fCA122bb6898B8B1282a`\n- USDC: `0xcebA9300f2b948710d2653dD7B07f33A8B32118C`\n- cEUR: `0xD8763CBa276a3738E6DE85b4b3bF5FDed6D6cA73`\n\n## Requirements\n\n- Foundry (forge, anvil, cast)\n- A Celo wallet with Celo,cUSD for testing\n\n## License\n\nGPL-3.0-or-later\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmento-protocol%2Fhackathon-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmento-protocol%2Fhackathon-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmento-protocol%2Fhackathon-demo/lists"}