{"id":22874031,"url":"https://github.com/angleprotocol/merkl-contracts","last_synced_at":"2026-04-06T06:03:39.280Z","repository":{"id":161161939,"uuid":"563459890","full_name":"AngleProtocol/merkl-contracts","owner":"AngleProtocol","description":"🥨 Contracts for Merkl, Angle Labs incentivization product for concentrated liquidity AMMs","archived":false,"fork":false,"pushed_at":"2024-12-11T11:35:22.000Z","size":9538,"stargazers_count":36,"open_issues_count":10,"forks_count":11,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-11T12:30:31.581Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AngleProtocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-11-08T16:54:47.000Z","updated_at":"2024-12-06T14:48:51.000Z","dependencies_parsed_at":"2023-10-16T20:08:47.914Z","dependency_job_id":"dd18a529-1b67-4590-9306-e1b2339f4242","html_url":"https://github.com/AngleProtocol/merkl-contracts","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":"AngleProtocol/boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngleProtocol%2Fmerkl-contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngleProtocol%2Fmerkl-contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngleProtocol%2Fmerkl-contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngleProtocol%2Fmerkl-contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AngleProtocol","download_url":"https://codeload.github.com/AngleProtocol/merkl-contracts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229556368,"owners_count":18091749,"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":"2024-12-13T14:32:28.011Z","updated_at":"2026-04-06T06:03:39.275Z","avatar_url":"https://github.com/AngleProtocol.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/AngleProtocol/merkl-contracts/actions/workflows/ci.yml/badge.svg)](https://github.com/AngleProtocol/merkl-contracts/actions)\n\nThis repository contains the core smart contracts for the Merkl solution.\n\nThe system consists of two primary contracts:\n\n- `DistributionCreator`: Allows DAOs and individuals to deposit rewards for incentivizing onchain actions\n- `Distributor`: Enables users to claim their earned rewards\n\nLearn more about Merkl in the [official documentation](https://docs.merkl.xyz).\n\n## Setup\n\n### Install packages\n\nInstall all dependencies by running:\n\n```bash\nbun i\n```\n\n### Create `.env` file\n\nCopy the `.env.example` file to `.env` and populate it with your keys and RPC endpoints:\n\n```bash\ncp .env.example .env\n```\n\n**Warning:** Always keep your confidential information secure and never commit `.env` files to version control.\n\n### Foundry Installation\n\nInstall Foundry using the official installer:\n\n```bash\ncurl -L https://foundry.paradigm.xyz | bash\n\nsource /root/.zshrc\n# or, if you're using bash: source /root/.bashrc\n\nfoundryup\n```\n\n## Tests\n\nRun the complete test suite:\n\n```bash\nforge test\n```\n\n## Deploying\n\n### Simulate deployment (dry run)\n\nRun a script without broadcasting transactions to the network:\n\n```bash\nyarn foundry:script \u003cpath_to_script\u003e --rpc-url \u003cnetwork\u003e\n```\n\n### Deploy to network\n\nExecute and broadcast transactions:\n\n```bash\nyarn foundry:deploy \u003cpath_to_script\u003e --rpc-url \u003cnetwork\u003e\n```\n\n## Scripts\n\nScripts can be executed with or without parameters:\n\n1. **With parameters:** Pass values directly as command-line arguments\n2. **Without parameters:** Modify default values within the script file before running\n\n### Running Scripts\n\nExecute scripts using the following pattern:\n\n```bash\n# With parameters - pass values as arguments\nforge script scripts/MockToken.s.sol:Deploy --rpc-url \u003cnetwork\u003e --sender \u003caddress\u003e --broadcast -i 1 \\\n  --sig \"run(string,string,uint8)\" \"MyToken\" \"MTK\" 18\n\n# Without parameters - modify default values in the script first\nforge script scripts/MockToken.s.sol:Deploy --rpc-url \u003cnetwork\u003e --sender \u003caddress\u003e --broadcast -i 1\n\n# Common options:\n#   --broadcast         Broadcasts transactions to the network\n#   --sender \u003caddress\u003e  Address that will execute the script\n#   -i 1                Opens an interactive prompt to securely enter the sender's private key\n```\n\n### Examples\n\n#### Deploy a mock ERC20 token\n\n```bash\nforge script scripts/MockToken.s.sol:Deploy --rpc-url \u003cnetwork\u003e --sender \u003caddress\u003e --broadcast \\\n  --sig \"run(string,string,uint8)\" \"MyToken\" \"MTK\" 18\n```\n\n#### Mint tokens to an address\n\n```bash\nforge script scripts/MockToken.s.sol:Mint --rpc-url \u003cnetwork\u003e --sender \u003caddress\u003e --broadcast \\\n  --sig \"run(address,address,uint256)\" \u003ctoken_address\u003e \u003crecipient\u003e 1000000000000000000\n```\n\n#### Configure minimum reward token amount\n\n```bash\nforge script scripts/DistributionCreator.s.sol:SetRewardTokenMinAmounts --rpc-url \u003cnetwork\u003e --sender \u003caddress\u003e --broadcast \\\n  --sig \"run(address,uint256)\" \u003creward_token_address\u003e \u003cmin_amount\u003e\n```\n\n#### Set campaign fees\n\n```bash\nforge script scripts/DistributionCreator.s.sol:SetCampaignFees --rpc-url \u003cnetwork\u003e --sender \u003caddress\u003e --broadcast \\\n  --sig \"run(uint32,uint256)\" \u003ccampaign_type\u003e \u003cfees\u003e\n```\n\n### Modifying Default Script Parameters\n\nFor scripts without parameters, modify the default values directly in the script file before execution:\n\n```solidity\n// In scripts/MockToken.s.sol:Deploy\nfunction run() external broadcast {\n  // MODIFY THESE VALUES TO SET YOUR DESIRED TOKEN PARAMETERS\n  string memory name = 'My Token'; // \u003c- Customize token name\n  string memory symbol = 'MTK'; // \u003c- Customize token symbol\n  uint8 decimals = 18; // \u003c- Customize decimal places\n  _run(name, symbol, decimals);\n}\n```\n\n## Audits\n\nThe Merkl smart contracts have been audited twice by Code4rena:\n\n- [August 2023 Audit Report](https://code4rena.com/reports/2023-06-angle)\n- [November 2025 Audit Report](https://code4rena.com/reports/2025-11-merkl)\n\n## Access Control\n\n![Access Control Schema](docs/access_control.svg)\n\n## Media\n\nReach out to us on [Twitter](https://x.com/merkl_xyz) 🐦\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangleprotocol%2Fmerkl-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangleprotocol%2Fmerkl-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangleprotocol%2Fmerkl-contracts/lists"}