{"id":21970041,"url":"https://github.com/scroll-tech/scroll-contracts","last_synced_at":"2025-04-09T13:11:19.451Z","repository":{"id":247795421,"uuid":"811121827","full_name":"scroll-tech/scroll-contracts","owner":"scroll-tech","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-31T10:09:00.000Z","size":2830,"stargazers_count":42,"open_issues_count":5,"forks_count":23,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-04-02T12:07:21.725Z","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/scroll-tech.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}},"created_at":"2024-06-06T01:26:30.000Z","updated_at":"2025-03-24T14:37:34.000Z","dependencies_parsed_at":"2024-11-14T09:26:58.185Z","dependency_job_id":"eef84b4b-78b6-43b9-8d53-371769ad89d6","html_url":"https://github.com/scroll-tech/scroll-contracts","commit_stats":{"total_commits":205,"total_committers":22,"mean_commits":9.318181818181818,"dds":"0.31219512195121957","last_synced_commit":"2d06562f3f252ddcd3dcda8d4bdec368ffbcc21d"},"previous_names":["scroll-tech/scroll-contracts"],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scroll-tech%2Fscroll-contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scroll-tech%2Fscroll-contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scroll-tech%2Fscroll-contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scroll-tech%2Fscroll-contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scroll-tech","download_url":"https://codeload.github.com/scroll-tech/scroll-contracts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248045251,"owners_count":21038554,"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-29T14:29:46.686Z","updated_at":"2025-04-09T13:11:19.411Z","avatar_url":"https://github.com/scroll-tech.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scroll Contracts\n\nThis directory contains the solidity code for Scroll L1 bridge and rollup contracts and L2 bridge and pre-deployed contracts.\n\n## Directory Structure\n\n\u003cpre\u003e\n├── \u003ca href=\"./hardhat-test/\"\u003ehardhat-test\u003c/a\u003e: Hardhat integration tests\n├── \u003ca href=\"./lib/\"\u003elib\u003c/a\u003e: External libraries and testing tools\n├── \u003ca href=\"./scripts\"\u003escripts\u003c/a\u003e: Deployment scripts\n├── \u003ca href=\"./src\"\u003esrc\u003c/a\u003e\n│   ├── \u003ca href=\"./src/gas-swap/\"\u003egas-swap\u003c/a\u003e: Utility contract that allows gas payment in other tokens\n│   ├── \u003ca href=\"./src/interfaces/\"\u003einterfaces\u003c/a\u003e: Common contract interfaces\n│   ├── \u003ca href=\"./src/L1/\"\u003eL1\u003c/a\u003e: Contracts deployed on the L1 (Ethereum)\n│   │   ├── \u003ca href=\"./src/L1/gateways/\"\u003egateways\u003c/a\u003e: Gateway router and token gateway contracts\n│   │   ├── \u003ca href=\"./src/L1/rollup/\"\u003erollup\u003c/a\u003e: Rollup contracts for data availability and finalization\n│   │   ├── \u003ca href=\"./src/L1/IL1ScrollMessenger.sol\"\u003eIL1ScrollMessenger.sol\u003c/a\u003e: L1 Scroll messenger interface\n│   │   └── \u003ca href=\"./src/L1/L1ScrollMessenger.sol\"\u003eL1ScrollMessenger.sol\u003c/a\u003e: L1 Scroll messenger contract\n│   ├── \u003ca href=\"./src/L2/\"\u003eL2\u003c/a\u003e: Contracts deployed on the L2 (Scroll)\n│   │   ├── \u003ca href=\"./src/L2/gateways/\"\u003egateways\u003c/a\u003e: Gateway router and token gateway contracts\n│   │   ├── \u003ca href=\"./src/L2/predeploys/\"\u003epredeploys\u003c/a\u003e: Pre-deployed contracts on L2\n│   │   ├── \u003ca href=\"./src/L2/IL2ScrollMessenger.sol\"\u003eIL2ScrollMessenger.sol\u003c/a\u003e: L2 Scroll messenger interface\n│   │   └── \u003ca href=\"./src/L2/L2ScrollMessenger.sol\"\u003eL2ScrollMessenger.sol\u003c/a\u003e: L2 Scroll messenger contract\n│   ├── \u003ca href=\"./src/libraries/\"\u003elibraries\u003c/a\u003e: Shared contract libraries\n│   ├── \u003ca href=\"./src/misc/\"\u003emisc\u003c/a\u003e: Miscellaneous contracts\n│   ├── \u003ca href=\"./src/mocks/\"\u003emocks\u003c/a\u003e: Mock contracts used in the testing\n│   ├── \u003ca href=\"./src/rate-limiter/\"\u003erate-limiter\u003c/a\u003e: Rater limiter contract\n│   └── \u003ca href=\"./src/test/\"\u003etest\u003c/a\u003e: Unit tests in solidity\n├── \u003ca href=\"./foundry.toml\"\u003efoundry.toml\u003c/a\u003e: Foundry configuration\n├── \u003ca href=\"./hardhat.config.ts\"\u003ehardhat.config.ts\u003c/a\u003e: Hardhat configuration\n├── \u003ca href=\"./remappings.txt\"\u003eremappings.txt\u003c/a\u003e: Foundry dependency mappings\n...\n\u003c/pre\u003e\n\n## Dependencies\n\n### Node.js\n\nFirst install [`Node.js`](https://nodejs.org/en) and [`npm`](https://www.npmjs.com/).\nRun the following command to install [`yarn`](https://classic.yarnpkg.com/en/):\n\n```bash\nnpm install --global yarn\n```\n\n### Foundry\n\nInstall `foundryup`, the Foundry toolchain installer:\n\n```bash\ncurl -L https://foundry.paradigm.xyz | bash\n```\n\nIf you do not want to use the redirect, feel free to manually download the `foundryup` installation script from [here](https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/foundryup).\n\nThen, run `foundryup` in a new terminal session or after reloading `PATH`.\n\nOther ways to install Foundry can be found [here](https://github.com/foundry-rs/foundry#installation).\n\n### Hardhat\n\nRun the following command to install [Hardhat](https://hardhat.org/) and other dependencies.\n\n```\nyarn install\n```\n\n## Build\n\n- Run `git submodule update --init --recursive` to initialize git submodules.\n- Run `yarn prettier:solidity` to run linting in fix mode, will auto-format all solidity codes.\n- Run `yarn prettier` to run linting in fix mode, will auto-format all typescript codes.\n- Run `yarn prepare` to install the precommit linting hook.\n- Run `forge build --evm-version cancun` to compile contracts with foundry.\n- Run `npx hardhat compile` to compile with hardhat.\n- Run `forge test --evm-version cancun -vvv` to run foundry units tests. It will compile all contracts before running the unit tests.\n- Run `npx hardhat test` to run integration tests. It may not compile all contracts before running, it's better to run `npx hardhat compile` first.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscroll-tech%2Fscroll-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscroll-tech%2Fscroll-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscroll-tech%2Fscroll-contracts/lists"}