@nocturne-xyz/contracts

v3.0.0
Nocturne contracts

bootstrap

yarn clean && yarn build

build

yarn build:foundry && yarn build:hardhat && cp -r ./poseidon-bytecode ./dist && ./scripts/shasum.sh

build:foundry

FOUNDRY_PROFILE=contracts forge build --sizes

build:hardhat

yarn compile && hardhat prepare-package && tsc --build && yarn copy-definitions

clean

hardhat clean && rm -rf .turbo artifacts cache_hardhat dist src foundry_artifacts

compile

hardhat compile

copy-definitions

cp src/*.d.ts dist/src

flatten:hardhat

hardhat flatten

inspect:storage-layout

./storage_inspect.sh

lint

solhint contracts/*.sol

lint:fix

solhint --fix contracts/*.sol && yarn prettier --write

prettier:check

prettier --check ./contracts

prettier:write

prettier --write './contracts'

prepublish

yarn bootstrap && yarn build

publish

yarn build; yarn npm publish --access public

test:coverage

FOUNDRY_PROFILE=contracts forge coverage

test:coverage:report

FOUNDRY_PROFILE=contracts forge coverage --report lcov

test:deep-invariant

FOUNDRY_PROFILE=deep forge test

test:fork

yarn test:fork:all; yarn test:fork:reth

test:fork:all

forge test --fork-block-number 18208803 --match-contract 'WstethTest|UniswapTest|BalancerTest' --fork-url https://eth-mainnet.g.alchemy.com/v2/X21iuJe_hcEAH4cooxG7xGuTQ-ebJJmB

test:fork:reth

forge test --fork-block-number 17823595 --match-contract 'RethTest' --fork-url https://eth-mainnet.g.alchemy.com/v2/X21iuJe_hcEAH4cooxG7xGuTQ-ebJJmB

test:gas-report

yarn test:unit --gas-report

test:invariant-summary

yarn test:unit -vv -m invariant_callSummary

test:unit

forge test -vv --no-match-contract 'WstethTest|UniswapTest|BalancerTest|RethTest'

verify:hardhat

hardhat verify
npm i @nocturne-xyz/contracts

Metadata

Downloads