{"bugs":{"url":"https://github.com/ethereum-optimism/optimism/issues"},"dist":{"shasum":"5d34996ca73c341792a0dbda6dd60ce86ca12c62","tarball":"https://registry.npmjs.org/@eth-optimism/contracts/-/contracts-0.0.0-2022310341.tgz","fileCount":317,"integrity":"sha512-DyogHJKYuABHgOZgV1sv00i3Wmyt5eFOxlN2HPN+BcWk91rerAONS6c124FFpDVhf6FLmG9VJdye+ElledcrAQ==","signatures":[{"sig":"MEYCIQCHxX9dRsNEXbM6TEdMj/2zIpyH6vzytNPDNIPss99EfwIhAJWuBEc+3rHHJxdE3a/6Z5mw9hnB7KQLY0UcZxNMSqcJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7674459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRkFrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrm5hAAiy+8lvKlHc54HegNbxb/tg7qG5T3mHYtAlvHVBttvcPw+vIz\r\nSKL1+JsIOVoL7OfTcW1bj8nQFNMuE1QKjJ+1QA1bOJ0Oe0YF28s240w1ccDS\r\nKnd2jpKXBK+09gD33ZjdC9TvECp5yhOEhDY5KEX5vlR5iVmRz9IGuK6KtQdF\r\nLfiPgxskbuVjWU5U6/di4kD1eJiXhhhMdFaJBbs10Z3B6+mgQH2Xa+tCLJ87\r\nNxd2dRI/b9/07tq7BqeYIrEN3YhacMzILXDVs42Jl3/CJ5nMPB7Qvc5DtfG6\r\njHqYR4wUYwUYvbhFEE8W2hCVvwf/ZP+0qPN1eHerj851EUrhWmPKLHwCfFak\r\nOSlRjHfGjNc4XHcLOk4R9B4hkf04iTPH/i5sV+dcoAUxFd/Tb3hI1+4WOIjb\r\n2dnPDbxPrWZv+CaFo1DCOdDCTy5l+96saNyM0NGrLbKJnFH7QAZj+JDGyQBI\r\niXCfhECETwwOuwu864Sc9PaouLXrw52Xh/ODuV6Drci8jcwz64VNajPBOfw9\r\nEDDYNqkKWY/XyRdw7bhVHMyzEhgek0eEFUjBFDmUV3KMt2ZgD/60dBJi9vjF\r\nhld56IPsoAxCbF9jJvrqa5mjK/OlqIosDJCa2Sx4+nvM76h05Ejz7C66CgHJ\r\nvOpLLYyRKQupZ2CnhwrCXMTlEAEhopBvqYo=\r\n=0GtQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index","name":"@eth-optimism/contracts","types":"dist/index","author":{"name":"Optimism PBC"},"readme":"[![codecov](https://codecov.io/gh/ethereum-optimism/optimism/branch/master/graph/badge.svg?token=0VTG7PG7YR&flag=contracts)](https://codecov.io/gh/ethereum-optimism/optimism)\n\n# Optimism Smart Contracts\n\n`@eth-optimism/contracts` contains the various Solidity smart contracts used within the Optimism system.\nSome of these contracts are [meant to be deployed to Ethereum (\"Layer 1\")](https://github.com/ethereum-optimism/optimism/tree/develop/packages/contracts/contracts/L1), while others are [meant to be deployed to Optimism (\"Layer 2\")](https://github.com/ethereum-optimism/optimism/tree/develop/packages/contracts/contracts/L2).\nWithin each contract file you'll find the network upon which the contract is meant to be deloyed, listed as either `EVM` (for Ethereum) or `OVM` (for Optimism).\nIf neither `EVM` nor `OVM` are listed, the contract is likely intended to be used on either network.\n\n## Usage (npm)\n\nYou can import `@eth-optimism/contracts` to use the Optimism contracts within your own codebase.\nInstall via `npm` or `yarn`:\n\n```shell\nnpm install @eth-optimism/contracts\n```\n\nWithin your contracts:\n\n```solidity\nimport { SomeContract } from \"@eth-optimism/contracts/path/to/SomeContract.sol\";\n```\n\nNote that the `/path/to/SomeContract.sol` is the path to the target contract within the [contracts folder](https://github.com/ethereum-optimism/optimism/tree/develop/packages/contracts/contracts) inside of this package.\nFor example, the [L1CrossDomainMessenger](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts/contracts/L1/messaging/L1CrossDomainMessenger.sol) contract is located at `packages/contracts/contracts/L1/messaging/L1CrossDomainMessenger.sol`, relative to this README.\nYou would therefore import the contract as:\n\n\n```solidity\nimport { L1CrossDomainMessenger } from \"@eth-optimism/contracts/L1/messaging/L1CrossDomainMessenger.sol\";\n```\n\n## Guide for Developers\n\n### Setup\n\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\n```shell\nyarn install\n```\n\n### Running Tests\n\nTests are executed via `yarn`:\n\n```shell\nyarn test\n```\n\nRun specific tests by giving a path to the file you want to run:\n\n```shell\nyarn test ./test/path/to/my/test.spec.ts\n```\n\n### Measuring test coverage:\n\n```shell\nyarn test:coverage\n```\n\nThe output is most easily viewable by opening the html file in your browser:\n\n```shell\nopen ./coverage/index.html\n```\n\n### Compiling and Building\n\nCompile and build the various required with the `build` command:\n\n```shell\nyarn build\n```\n\n### Deploying the Contracts\n\n#### Required environment variables\n\nYou must set several required environment variables before you can execute a deployment.\nDuplicate the file [`.env.example`](./.env.example) and rename your duplicate to `.env`.\nFill out each of the environment variables before continuing.\n\n#### Creating a deployment configuration\n\nBefore you can carry out a deployment, you must create a deployment configuration file inside of the [deploy-config](./deploy-config/) folder.\nDeployment configuration files are TypeScript files that export an object that conforms to the `DeployConfig` type.\nSee [mainnet.ts](./deploy-config/mainnet.ts) for an example deployment configuration.\nWe recommend duplicating an existing deployment config and modifying it to satisfy your requirements.\n\n#### Executing a deployment\n\nOnce you've created your deploy config, you can execute a deployment with the following command:\n\n```\nnpx hardhat deploy --network <my network name>\n```\n\nNote that this only applies to fresh deployments.\nIf you want to upgrade an existing system (instead of deploying a new system from scratch), you must use the following command instead:\n\n```\nnpx hardhat deploy --network <my network name> --tags upgrade\n```\n\nDuring the deployment process, you will be asked to transfer ownership of several contracts to a special contract address.\nYou will also be asked to verify various configuration values.\nThis is a safety mechanism to make sure that actions within an upgrade are performed atomically.\nOwnership of these addresses will be automatically returned to the original owner address once the upgrade is complete.\nThe original owner can always recover ownership from the upgrade contract in an emergency.\nPlease read these instructions carefully, verify each of the presented configuration values, and carefully confirm that the contract you are giving ownership to has not been compromised (e.g., check the code on Etherscan).\n\nAfter your deployment is complete, your new contracts will be written to an artifacts directory in `./deployments/<my network name>`.\n\n#### Verifying contract source code\n\nContracts will be automatically verified via both [Etherscan](https://etherscan.io) and [Sourcify](https://sourcify.dev/) during the deployment process.\nIf there was an issue with verification during the deployment, you can manually verify your contracts with the command:\n\n```\nnpx hardhat etherscan-verify --network <my network name>\n```\n\n#### Creating a genesis file\n\nOptimism expects that certain contracts (called \"predeploys\") be deployed to the L2 network at pre-determined addresses.\nWe guarantee this by creating a genesis file in which certain contracts are already within the L2 state at the genesis block.\nTo create the genesis file for your network, you must first deploy the L1 contracts using the appropriate commands from above.\nOnce you've deployed your contracts, run the following command:\n\n```\nnpx hardhat take-dump --network <my network name>\n```\n\nA genesis file will be created for you at `/genesis/<my network name>.json`.\nYou can then ingest this file via `geth init`.\n\n### Hardhat tasks\n\n#### Whitelisting\n\nOptimism has removed the whitelist from the Optimism mainnet.\nHowever, if you are running your own network and still wish to use the whitelist, you can manage the whitelist with the `whitelist` task.\nRun the following to get help text for the `whitelist` command:\n\n```\nnpx hardhat whitelist --help\n```\n\n#### Withdrawing fees\n\nAny wallet can trigger a withdrawal of fees within the `SequencerFeeWallet` contract on L2 back to L1 as long as a threshold balance has been reached.\nFees within the wallet will return to a fixed address on L1.\nRun the following to get help text for the `withdraw-fees` command:\n\n```\nnpx hardhat withdraw-fees --help\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.\nWe also maintain a [bug bounty program via Immunefi](https://immunefi.com/bounty/optimism/) with a maximum payout of $2,000,042 for critical bug reports.\n","gitHead":"ef1b11e91f268a1b0807e30f75ec344b20752b73","license":"MIT","scripts":{"lint":"yarn lint:fix && yarn lint:check","test":"yarn test:contracts","build":"yarn build:contracts && yarn autogen:artifacts && yarn build:typescript","clean":"rm -rf ./dist ./artifacts ./cache ./coverage ./tsconfig.build.tsbuildinfo","prepack":"yarn prepublishOnly","lint:fix":"yarn lint:contracts:fix && yarn lint:ts:fix","postpack":"yarn postpublish","lint:check":"yarn lint:contracts:check && yarn lint:ts:check","pre-commit":"lint-staged","lint:ts:fix":"eslint --fix .","postpublish":"rimraf chugsplash L1 L2 libraries standards","test:slither":"slither .","validateDocs":"hardhat validateOutput","lint:ts:check":"eslint . --max-warnings=0","test:coverage":"NODE_OPTIONS=--max_old_space_size=8192 hardhat coverage && istanbul check-coverage --statements 90 --branches 84 --functions 88 --lines 90","prepublishOnly":"yarn copyfiles -u 1 -e \"**/test-*/**/*\" \"contracts/**/*\" ./","test:contracts":"hardhat test --show-stack-traces","build:contracts":"hardhat compile --show-stack-traces","pretest:slither":"rm -f @openzeppelin && rm -f @ens && rm -f hardhat && ln -s ../../node_modules/@openzeppelin @openzeppelin && ln -s ../../node_modules/@ens @ens && ln -s ../../node_modules/hardhat hardhat","autogen:markdown":"ts-node scripts/generate-markdown.ts","build:typescript":"tsc -p ./tsconfig.build.json","posttest:slither":"rm -f @openzeppelin && rm -f @ens && rm -f hardhat","autogen:artifacts":"ts-node scripts/generate-artifacts.ts && ts-node scripts/generate-deployed-artifacts.ts","lint:contracts:fix":"yarn prettier --write 'contracts/**/*.sol'","lint:contracts:check":"yarn solhint -f table 'contracts/**/*.sol'"},"_npmUser":{"name":"karlfloersch","email":"karl@karl.tech"},"homepage":"https://github.com/ethereum-optimism/optimism/tree/develop/packages/contracts#readme","keywords":["optimism","ethereum","contracts","solidity"],"repository":{"url":"git+https://github.com/ethereum-optimism/optimism.git","type":"git"},"_npmVersion":"8.3.1","description":"[Optimism] L1 and L2 smart contracts for Optimism","directories":{},"maintainers":[{"name":"karlfloersch","email":"karl@karl.tech"},{"name":"ben-chain","email":"ben@optimism.io"},{"name":"k-ho","email":"kevin@optimism.io"},{"name":"tynes","email":"tyneway12@gmail.com"},{"name":"kelvinfichter","email":"kelvinfichter@gmail.com"}],"_nodeVersion":"16.14.0","dependencies":{"@eth-optimism/core-utils":"0.0.0-2022310341","@ethersproject/abstract-signer":"^5.5.0","@ethersproject/hardware-wallets":"^5.5.0","@ethersproject/abstract-provider":"^5.5.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rlp":"^2.2.6","chai":"^4.3.4","glob":"^7.1.6","mocha":"^8.4.0","dotenv":"^10.0.0","eslint":"^7.27.0","ethers":"^5.5.4","lodash":"^4.17.21","mkdirp":"^1.0.4","hardhat":"^2.9.2","solhint":"^3.3.6","ts-node":"^10.0.0","istanbul":"^0.4.5","prettier":"^2.3.1","copyfiles":"^2.3.0","typechain":"^6.0.2","squirrelly":"^8.0.8","typescript":"^4.3.5","@types/chai":"^4.2.18","@types/node":"^17.0.21","lint-staged":"11.0.0","@types/mocha":"^8.2.2","babel-eslint":"^10.1.0","merkletreejs":"^0.2.18","ts-generator":"0.0.8","@types/lodash":"^4.14.168","@types/mkdirp":"^1.0.1","directory-tree":"^2.2.7","hardhat-deploy":"^0.9.3","ethereum-waffle":"^3.3.0","random-bytes-seed":"^1.0.3","solidity-coverage":"^0.7.17","@codechecks/client":"^0.1.11","@ethersproject/abi":"^5.6.0","@typechain/hardhat":"^3.0.0","eslint-plugin-jsdoc":"^35.1.2","eslint-plugin-react":"^7.24.0","@ethersproject/bytes":"^5.6.0","@typechain/ethers-v5":"^8.0.2","eslint-plugin-import":"^2.23.4","hardhat-gas-reporter":"^1.0.4","merkle-patricia-tree":"^4.0.0","eslint-plugin-unicorn":"^32.0.1","@defi-wonderland/smock":"^2.0.2","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^3.4.0","@openzeppelin/contracts":"4.3.2","solhint-plugin-prettier":"^0.0.5","@ethersproject/providers":"^5.6.0","@nomiclabs/ethereumjs-vm":"^4.2.2","hardhat-output-validator":"^0.1.18","prettier-plugin-solidity":"^1.0.0-beta.18","@nomiclabs/hardhat-ethers":"^2.0.2","@nomiclabs/hardhat-waffle":"^2.0.1","@typescript-eslint/parser":"^4.26.0","@primitivefi/hardhat-dodoc":"^0.1.3","eslint-plugin-prefer-arrow":"^1.2.3","@nomiclabs/hardhat-etherscan":"^2.1.6","@typescript-eslint/eslint-plugin":"^4.26.0","@openzeppelin/contracts-upgradeable":"4.3.2"},"peerDependencies":{"ethers":"^5"},"_npmOperationalInternal":{"tmp":"tmp/contracts_0.0.0-2022310341_1648771435202_0.82591149154094","host":"s3://npm-registry-packages"},"_id":"@eth-optimism/contracts@0.0.0-2022310341","version":"0.0.0-2022310341"}