{"id":18705074,"url":"https://github.com/aave/aave-sandbox","last_synced_at":"2025-10-07T09:20:00.619Z","repository":{"id":41956710,"uuid":"438572949","full_name":"aave/aave-sandbox","owner":"aave","description":"Sandbox of Aave Markets that replicates a forked production environment. The environment is envisioned for testing liquidations or other integrations.","archived":false,"fork":false,"pushed_at":"2023-02-21T14:55:52.000Z","size":413,"stargazers_count":32,"open_issues_count":3,"forks_count":14,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-05T13:38:26.174Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"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/aave.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,"zenodo":null}},"created_at":"2021-12-15T09:38:32.000Z","updated_at":"2025-04-14T17:53:32.000Z","dependencies_parsed_at":"2025-04-12T10:15:50.954Z","dependency_job_id":null,"html_url":"https://github.com/aave/aave-sandbox","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aave/aave-sandbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aave%2Faave-sandbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aave%2Faave-sandbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aave%2Faave-sandbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aave%2Faave-sandbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aave","download_url":"https://codeload.github.com/aave/aave-sandbox/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aave%2Faave-sandbox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278748484,"owners_count":26038922,"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-10-07T02:00:06.786Z","response_time":59,"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":[],"created_at":"2024-11-07T12:09:39.211Z","updated_at":"2025-10-07T09:20:00.575Z","avatar_url":"https://github.com/aave.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aave Sandbox\n\nSandbox of Aave Markets that replicates a forked production environment. The environment is envisioned for testing liquidations or other integrations that requires a production state using Hardhat Node and Alchemy.\n\n## Requisites\n\n- Git\n- Node.js version \u003e= 16\n  - You can install and manage any Node.js version easily with [nvm](https://github.com/nvm-sh/nvm)\n\n## Getting Started\n\nClone the repository:\n\n```\ngit clone https://github.com/aave/aave-sandbox.git\n```\n\nInstall dependencies:\n\n```\nnpm i\n```\n\nCompile Contract:\n\n```\nnpm run compile\n```\n\nCreate a `.env` file\n\n```\ntouch .env\n```\n\nObtain an [Alchemy](https://www.alchemy.com/) API key to be able to fork chains. The free tier of Alchemy allows archival node.\n\nOnce you have the Alchemy key, open `.env` with your favorite editor and fill the environment variable named `ALCHEMY_KEY`, as follows:\n\n```\n# Content of .env file\nALCHEMY_KEY=your-alchemy-key\n```\n\n## Fork Aave markets\n\nIf you want to integrate any of the deployed Aave markets, you can spin a sandbox node in the following way.\n\nIn a separate window, run the sandbox Hardhat fork node that will be reachable via JSON RPC at `http://127.0.0.1:8545/`. You can spin the sandbox node with one of the following commands:\n\n```\nnode:fork:arc\nnode:fork:main-v2\nnode:fork:polygon-v3\nnode:fork:avalanche-v3\nnode:fork:arbitrum-v3\nnode:fork:optimism-v3\nnode:fork:fantom-v3\nnode:fork:harmony-v3,\nnode:fork:main-v3\n```\n\nNow you can connect to the Hardhat Node via JSON RPC at `http://127.0.0.1:8545/` in your project and use official deployed addresses to interact with the market.\n\nOnce the node is running, the following tasks will be available, and will point to the local sandbox node.\n\n    \"feed-market\": \"hardhat --network localhost feed-market --market $0\",\n    \"feed-accounts\": \"hardhat --network localhost feed-accounts --market $0\",\n    \"whitelist-accounts:arc\": \"hardhat --network localhost whitelist-accounts --market $@\",\n    \"print-accounts\": \"hardhat --network localhost print-accounts -- $@\",\n\n\n\n### feed-market\n\nThe `feed-market` command will add simulated users and liquidity to a forked market.\n\nUsage:\n\n```\nnpm run feed-market:main-v3\n```\n\nor replace main-v3 with one of: arc, main-v2, polygon-v3, arbitrum-v3, avalanche-v3, optimism-v3, harmony-v3, fantom-v3.\n\n\n### feed-accounts\n\nYou can mint official ERC20 tokens to any address using the `feed-account` task. The task will override the balance of the address via `hardhat_setStorage`.\n\nYou can use the following command as a faucet to get all ERC20 tokens being used inside a market: \n\n```\nnpm run feed-accounts:polygon-v3 -- --accounts 0x976EA74026E726554dB657fA54763abd0C3a0aa9,\u003cother-user-address\u003e\n```\n\nNote: the extra `--` is important to pass arguments to Hardhat\n\n### print-accounts\n\nView user positions and health factors from accounts passed to  `--accounts` parameter with the following command:\n\n```\nnpm run print-accounts:polygon-v3 -- --accounts 0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f,0x14dC79964da2C08b23698B3D3cc7Ca32193d9955\n```\n\nNote: the extra `--` is important to pass arguments to Hardhat\n\nOutput:\n\n```\nUser Info:\n- Address: 0x976EA74026E726554dB657fA54763abd0C3a0aa9\n- Health Factor:  0.918421511765627487\n- Balances\n┌─────────┬───────────────────┬───────────────────┬──────────────────────────┬────────┐\n│ (index) │ enabledCollateral │ collateralBalance │       debtBalance        │ symbol │\n├─────────┼───────────────────┼───────────────────┼──────────────────────────┼────────┤\n│    0    │       true        │     '50000.0'     │          '0.0'           │ 'USDC' │\n│    1    │       false       │       '0.0'       │          '43.0'          │ 'WBTC' │\n│    2    │       false       │       '0.0'       │ '543.999999948668340512' │ 'WETH' │\n│    3    │       true        │     '50000.0'     │          '0.0'           │ 'AAVE' │\n└─────────┴───────────────────┴───────────────────┴──────────────────────────┴────────┘\n[...]\n```\n\n### whitelist-accounts:arc\n\n\nFor whitelisting your accounts or smart contracts like liquidation bots into Aave Arc Sandbox, you can use the following command passing in addresses to `--accounts` parameter:\n\n```\nnpm run whitelist-accounts:arc --accounts \u003cyour-account-address\u003e,\u003cyour-smart-contract-address\u003e\n```\n\nNote: the extra `--` is important to pass arguments to Hardhat\n\n## Utilities\n\n### Enable mining by interval\n\nBy default Hardhat node mines blocks every time you perform a transaction, but for some scenarios you may need the node to mine blocks by interval.\n\nYou can enable Hardhat to mine blocks every 5 seconds with the following command:\n\n```\nnpm run set-interval-mining\n```\n\nTo disable mining empty blocks, you can run:\n\n```\nnpm run set-interval-mining:off\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faave%2Faave-sandbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faave%2Faave-sandbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faave%2Faave-sandbox/lists"}