@eth-optimism/contracts

v0.0.0-202272320426
[Optimism] L1 and L2 smart contracts for Optimism
optimism ethereum contracts solidity

build

yarn build:contracts && yarn autogen:artifacts && yarn build:typescript

build:typescript

tsc -p ./tsconfig.json

build:contracts

hardhat compile --show-stack-traces

autogen:markdown

ts-node scripts/generate-markdown.ts

autogen:artifacts

ts-node scripts/generate-artifacts.ts && ts-node scripts/generate-deployed-artifacts.ts

test

yarn test:contracts

test:contracts

hardhat test --show-stack-traces

test:coverage

NODE_OPTIONS=--max_old_space_size=8192 hardhat coverage && istanbul check-coverage --statements 90 --branches 84 --functions 88 --lines 90

test:slither

slither .

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

posttest:slither

rm -f @openzeppelin && rm -f @ens && rm -f hardhat

lint:ts:check

eslint . --max-warnings=0

lint:contracts:check

yarn solhint -f table 'contracts/**/*.sol'

lint:check

yarn lint:contracts:check && yarn lint:ts:check

lint:ts:fix

eslint --fix .

lint:contracts:fix

yarn prettier --write 'contracts/**/*.sol'

lint:fix

yarn lint:contracts:fix && yarn lint:ts:fix

lint

yarn lint:fix && yarn lint:check

clean

rm -rf ./dist ./artifacts ./cache ./coverage ./tsconfig.tsbuildinfo

prepublishOnly

yarn copyfiles -u 1 -e "**/test-*/**/*" "contracts/**/*" ./

postpublish

rimraf chugsplash L1 L2 libraries standards

prepack

yarn prepublishOnly

postpack

yarn postpublish

pre-commit

lint-staged

validateDocs

hardhat validateOutput
npm i @eth-optimism/[email protected]

Metadata

  • MIT
  • Whatever
  • Optimism PBC
  • released 8/23/2022

Downloads