Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cantina-review #580

Merged
merged 18 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/foundry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
- type: "slow"
fuzz-runs: 10000
max-test-rejects: 500000
invariant-runs: 48
invariant-depth: 2048
invariant-runs: 0
invariant-depth: 512
- type: "fast"
fuzz-runs: 256
max-test-rejects: 65536
invariant-runs: 16
invariant-runs: 0
invariant-depth: 256

runs-on: ubuntu-latest
Expand All @@ -45,3 +45,4 @@ jobs:
FOUNDRY_FUZZ_MAX_TEST_REJECTS: ${{ matrix.max-test-rejects }}
FOUNDRY_INVARIANT_RUNS: ${{ matrix.invariant-runs }}
FOUNDRY_INVARIANT_DEPTH: ${{ matrix.invariant-depth }}
FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }}
20 changes: 20 additions & 0 deletions .github/workflows/npm-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Publish on NPM

on:
workflow_dispatch:

jobs:
publish-to-npm:
name: Publish to NPM
runs-on: ubuntu-latest
environment:
name: npm
url: https://www.npmjs.com/package/@morpho-org/morpho-blue
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Publish to npm
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
yarn publish --access public
2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ via-ir = true
optimizer_runs = 4294967295

[profile.default.invariant]
runs = 16
runs = 8
depth = 256
fail_on_revert = true

Expand Down
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
{
"name": "morpho-blue",
"name": "@morpho-org/morpho-blue",
"description": "Morpho Blue Protocol",
"license": "BUSL-1.1",
"version": "1.0.0",
"version": "0.1.0",
"files": [
"src",
"README.md",
"LICENSE"
],
"scripts": {
"postinstall": "husky install && forge install",
"prepare": "husky install && forge install",
"build:forge": "FOUNDRY_PROFILE=build forge build",
"build:hardhat": "npx hardhat compile",
"test:forge": "FOUNDRY_PROFILE=test forge test",
Expand Down
4 changes: 2 additions & 2 deletions test/forge/libraries/periphery/MorphoBalancesLibTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ contract MorphoBalancesLibTest is BaseTest {
}

function testExpectedSupplyBalance(uint256 amountSupplied, uint256 amountBorrowed, uint256 timeElapsed, uint256 fee)
internal
public
{
_generatePendingInterest(amountSupplied, amountBorrowed, timeElapsed, fee);

Expand All @@ -85,7 +85,7 @@ contract MorphoBalancesLibTest is BaseTest {
}

function testExpectedBorrowBalance(uint256 amountSupplied, uint256 amountBorrowed, uint256 timeElapsed, uint256 fee)
internal
public
{
_generatePendingInterest(amountSupplied, amountBorrowed, timeElapsed, fee);

Expand Down
26 changes: 13 additions & 13 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"compilerOptions": {
"target": "esnext",
"strict": true,
"esModuleInterop": true,
"rootDir": ".",
"baseUrl": ".",
"outDir": "dist",
"moduleResolution": "nodenext",
"resolveJsonModule": true,
"declaration": true
},
"include": ["types", "test/hardhat"],
"files": ["./hardhat.config.ts"]
"compilerOptions": {
"target": "es6",
"module": "nodenext",
"moduleResolution": "nodenext",
"outDir": "dist",
"baseUrl": ".",
"strict": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"declaration": true
},
"include": ["types", "test/hardhat"],
"files": ["hardhat.config.ts"]
}