{"id":19441554,"url":"https://github.com/dgca/macro-security","last_synced_at":"2026-05-16T02:06:13.683Z","repository":{"id":39916619,"uuid":"494814193","full_name":"dgca/macro-security","owner":"dgca","description":null,"archived":false,"fork":false,"pushed_at":"2022-05-21T19:04:34.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-07T21:53:00.802Z","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/dgca.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}},"created_at":"2022-05-21T14:59:15.000Z","updated_at":"2022-05-21T19:04:37.000Z","dependencies_parsed_at":"2022-09-21T04:42:02.251Z","dependency_job_id":null,"html_url":"https://github.com/dgca/macro-security","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"0xMacro/local-ethernauts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgca%2Fmacro-security","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgca%2Fmacro-security/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgca%2Fmacro-security/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgca%2Fmacro-security/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dgca","download_url":"https://codeload.github.com/dgca/macro-security/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240625715,"owners_count":19831386,"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-11-10T15:36:12.660Z","updated_at":"2026-05-16T02:06:13.642Z","avatar_url":"https://github.com/dgca.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# local-ethernauts\n\nThis challenge is based on https://ethernaut.openzeppelin.com/\n\n# Setup\n\n1. Get all the dependencies installed with `yarn install`\n2. Compile all contracts by running `npx hardhat compile`\n3. Run a local node by running `npx hardhat node`\n\n# How to solve each level\n\n- If you look inside the `contracts/` directory you'll find 8 levels for you to solve!\n- Each level directory consists of the same structure, let's check out the first one to illustrate this:\n  - **CoinFlip.sol**: This is the contract you're supposed to hack!\n  - **AttackingCoinFlip.sol**: This is the malicious contract where you'll code the logic to exploit the vulnerable contract!\n  - **CoinFlip.test.ts**: This is the file where you'll be able to test if the contract has been breached\n  - **CoinFlipHelper.ts**: Not all challenges have this `Helper` file! Only the ones that require you to use `ethers` to interact with your contract do, which you can do right here! This function is already imported into the tests, so don't worry about anything other than coding!\n  - And finally, the **README**. On this one you'll get all level instructions!\n- After you're done writing your hack, run the following command to run the tests and see if you succesfully breached the contract:\n  - `npx hardhat test contracts/{contract directory}/{contract name}.test.ts`\n  - Example: `npx hardhat test \"contracts/1. CoinFlip/CoinFlip.test.ts\"`\n\n# Helpful Tip\n\n- You can console.log in solidity using hardhat! Read here for more details: https://hardhat.org/tutorial/debugging-with-hardhat-network.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgca%2Fmacro-security","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdgca%2Fmacro-security","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgca%2Fmacro-security/lists"}