{"id":13892991,"url":"https://github.com/ethereum-optimism/contracts","last_synced_at":"2025-07-17T06:31:54.419Z","repository":{"id":50561809,"uuid":"295311607","full_name":"ethereum-optimism/contracts","owner":"ethereum-optimism","description":"[Optimism] Smart Contracts","archived":true,"fork":false,"pushed_at":"2021-04-12T00:07:24.000Z","size":2713,"stargazers_count":254,"open_issues_count":21,"forks_count":112,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-08-07T17:33:10.078Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ethereum-optimism.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2020-09-14T05:19:48.000Z","updated_at":"2024-07-25T16:31:51.000Z","dependencies_parsed_at":"2022-08-06T09:00:39.713Z","dependency_job_id":null,"html_url":"https://github.com/ethereum-optimism/contracts","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethereum-optimism%2Fcontracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethereum-optimism%2Fcontracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethereum-optimism%2Fcontracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethereum-optimism%2Fcontracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethereum-optimism","download_url":"https://codeload.github.com/ethereum-optimism/contracts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226226507,"owners_count":17592385,"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-08-06T17:01:22.358Z","updated_at":"2024-11-24T20:32:04.185Z","avatar_url":"https://github.com/ethereum-optimism.png","language":"Solidity","funding_links":[],"categories":["Solidity"],"sub_categories":[],"readme":"**[DEPRECATED]** This repository is now deprecated in favour of the new development [monorepo](https://github.com/ethereum-optimism/optimism-monorepo).\n\n# Optimistic Ethereum Smart Contracts\n\n`@eth-optimism/contracts` contains the various Solidity smart contracts used within the Optimistic Ethereum system.\nSome of these contracts are deployed on Ethereum (\"Layer 1\"), while others are meant to be deployed to Optimistic Ethereum (\"Layer 2\").\n\nWithin each contract file you'll find a comment that lists:\n1. The compiler with which a contract is intended to be compiled, `solc` or `optimistic-solc`.\n2. The network upon to which the contract will be deployed, `OVM` or `EVM`.\n\nA more detailed overview of these contracts can be found on the [community hub](http://community.optimism.io/docs/protocol/protocol.html#system-overview).\n\n\u003c!-- TODO: Add link to final contract docs here when finished. --\u003e\n\n## Usage (npm)\nIf your development stack is based on Node/npm:\n\n```shell\nnpm install @eth-optimism/contracts\n```\n\nWithin your contracts:\n\n```solidity\nimport { SomeContract } from \"@eth-optimism/contracts/SomeContract.sol\";\n```\n\n## Guide for Developers\n### Setup\nInstall the following:\n- [`Node.js` (14+)](https://nodejs.org/en/)\n- [`npm`](https://www.npmjs.com/get-npm)\n- [`yarn`](https://classic.yarnpkg.com/en/docs/install/)\n\nClone the repo:\n\n```shell\ngit clone https://github.com/ethereum-optimism/contracts.git\ncd contracts\n```\n\nInstall `npm` packages:\n```shell\nyarn install\n```\n\n### Running Tests\nTests are executed via `yarn`:\n```shell\nyarn test\n```\n\nRun specific tests by giving a path to the file you want to run:\n```shell\nyarn test ./test/path/to/my/test.spec.ts\n```\n\n### Measuring test coverage:\n```shell\nyarn test-coverage\n```\n\nThe output is most easily viewable by opening the html file in your browser:\n```shell\nopen ./coverage/index.html\n```\n\n### Compiling and Building\nEasiest way is to run the primary build script:\n```shell\nyarn build\n```\n\nRunning the full build command will perform the following actions:\n1. `build:contracts` - Compile all Solidity contracts with both the EVM and OVM compilers.\n2. `build:typescript` - Builds the typescript files that are used to export utilities into js.\n3. `build:copy` - Copies various other files into the build folder.\n4. `build:dump` - Generates a genesis state from the contracts that L2 geth will use.\n5. `build:typechain` - Generates [TypeChain](https://github.com/ethereum-ts/TypeChain) artifacts.\n\nYou can also build specific components as follows:\n```shell\nyarn build:contracts\n```\n\n## Security\nPlease refer to our [Security Policy](https://github.com/ethereum-optimism/.github/security/policy) for information about how to disclose security issues with this code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethereum-optimism%2Fcontracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethereum-optimism%2Fcontracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethereum-optimism%2Fcontracts/lists"}