diff --git a/.github/workflows/foundry.yml b/.github/workflows/foundry.yml index c44ea75da..4334bdbf6 100644 --- a/.github/workflows/foundry.yml +++ b/.github/workflows/foundry.yml @@ -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 @@ -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 }} diff --git a/.github/workflows/npm-release.yml b/.github/workflows/npm-release.yml new file mode 100644 index 000000000..51aaf7f53 --- /dev/null +++ b/.github/workflows/npm-release.yml @@ -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 diff --git a/foundry.toml b/foundry.toml index b698a4eec..d641b9154 100644 --- a/foundry.toml +++ b/foundry.toml @@ -5,7 +5,7 @@ via-ir = true optimizer_runs = 4294967295 [profile.default.invariant] -runs = 16 +runs = 8 depth = 256 fail_on_revert = true diff --git a/package.json b/package.json index 4c3d2c830..9f9364482 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/test/forge/libraries/periphery/MorphoBalancesLibTest.sol b/test/forge/libraries/periphery/MorphoBalancesLibTest.sol index 516bb0847..e99a5fbf4 100644 --- a/test/forge/libraries/periphery/MorphoBalancesLibTest.sol +++ b/test/forge/libraries/periphery/MorphoBalancesLibTest.sol @@ -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); @@ -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); diff --git a/tsconfig.json b/tsconfig.json index b301bff05..7d4c1978e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -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"] }