https://github.com/derekbar90/optimism-openzeppelin-compat
OpenZeppelin patch module for Optimism
https://github.com/derekbar90/optimism-openzeppelin-compat
Last synced: 3 months ago
JSON representation
OpenZeppelin patch module for Optimism
- Host: GitHub
- URL: https://github.com/derekbar90/optimism-openzeppelin-compat
- Owner: derekbar90
- Created: 2021-03-26T19:44:56.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-26T21:33:24.000Z (about 4 years ago)
- Last Synced: 2025-02-15T17:03:14.266Z (3 months ago)
- Homepage:
- Size: 20.5 KB
- Stars: 11
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# optimism-openzeppelin-compat
[](https://www.npmjs.com/package/@thesatoshicompany/optimism-openzeppelin-compat)This repo contains patches needed to use the OpenZeppelin contracts with Optimism L2.
> Example: When using Optimism ETH is not supported and instead WETH
> must be used. When using OpenZeppelin Address contract via ERC20,
> there are balance checks for ETH and thus the compilation fails due to
> an unsupported OPCODE. This patches these issues and allows for
> seamless development.## Installation
Use the following command to install:
```
npm i --save @thesatoshicompany/optimism-openzeppelin-compat
```Add the following to the package.json scripts section:
```
"scripts": {
+ "postinstall": "patch-package --patch-dir node_modules/@thesatoshicompany/optimism-openzeppelin-compat/patches"
},
````Note: Post install script is needed because this package does not patch files on install automatically. It only provides the appropriate patches and the needed module to apply them.`
`This was a design choice so full control is left to the consumer of the module for if and when they are applied.`
## Supported OpenZeppelin Versions
v3.4.1
## Have an additional patch which should be included?
Provide a PR and a review will happen so that it can be included.