-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from maple-labs/release
Release v5.0.2
- Loading branch information
Showing
24 changed files
with
533 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ name: Forge Tests (PR) | |
on: [pull_request] | ||
|
||
jobs: | ||
run-ci: | ||
test: | ||
name: Test with "deep" profile | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -39,11 +40,32 @@ jobs: | |
- name: Generate coverage report | ||
run: | | ||
forge coverage --report lcov | ||
sudo apt-get install lcov | ||
lcov --remove lcov.info -o lcov.info 'tests/*' | ||
- name: Report code coverage | ||
uses: zgosalvez/github-actions-report-lcov@v1 | ||
with: | ||
coverage-files: lcov.info | ||
minimum-coverage: 65 | ||
minimum-coverage: 90 | ||
artifact-name: code-coverage-report | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
working-directory: ./ | ||
|
||
size_check: | ||
name: Check contracts sizes | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Foundry | ||
uses: onbjerg/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Install submodules | ||
run: | | ||
git config --global url."https://github.com/".insteadOf "[email protected]:" | ||
git submodule update --init --recursive | ||
- name: Check contract sizes | ||
run: ./scripts/check-sizes.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,8 @@ on: | |
- main | ||
|
||
jobs: | ||
run-ci: | ||
test: | ||
name: Test with "deep" profile | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -42,11 +43,32 @@ jobs: | |
- name: Generate coverage report | ||
run: | | ||
forge coverage --report lcov | ||
sudo apt-get install lcov | ||
lcov --remove lcov.info -o lcov.info 'tests/*' | ||
- name: Report code coverage | ||
uses: zgosalvez/github-actions-report-lcov@v1 | ||
with: | ||
coverage-files: lcov.info | ||
minimum-coverage: 65 | ||
minimum-coverage: 90 | ||
artifact-name: code-coverage-report | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
working-directory: ./ | ||
|
||
size_check: | ||
name: Check contracts sizes | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Foundry | ||
uses: onbjerg/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Install submodules | ||
run: | | ||
git config --global url."https://github.com/".insteadOf "[email protected]:" | ||
git submodule update --init --recursive | ||
- name: Check contract sizes | ||
run: ./scripts/check-sizes.sh |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,11 @@ | ||
install: | ||
@git submodule update --init --recursive | ||
|
||
update: | ||
@forge update | ||
|
||
build: | ||
@scripts/build.sh -p default | ||
@scripts/build.sh -p production | ||
|
||
release: | ||
@scripts/release.sh | ||
|
||
size: | ||
@scripts/check-sizes.sh | ||
|
||
test: | ||
@scripts/test.sh -p default | ||
|
||
clean: | ||
@forge clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
pragma solidity 0.8.7; | ||
|
||
import { ProxiedInternals } from "../modules/maple-proxy-factory/modules/proxy-factory/contracts/ProxiedInternals.sol"; | ||
|
||
import { IGlobalsLike, IMapleProxyFactoryLike } from "./interfaces/Interfaces.sol"; | ||
|
||
import { MapleLoanStorage } from "./MapleLoanStorage.sol"; | ||
|
||
/// @title MapleLoanV502Migrator is to update the factory address for each deployed loan. | ||
contract MapleLoanV502Migrator is ProxiedInternals, MapleLoanStorage { | ||
|
||
fallback() external { | ||
( address newFactory_ ) = abi.decode(msg.data, (address)); | ||
|
||
require(_factory() != newFactory_, "MLV502M:INVALID_NO_OP"); | ||
|
||
address globals = IMapleProxyFactoryLike(_factory()).mapleGlobals(); | ||
|
||
require(IGlobalsLike(globals).isInstanceOf("FT_LOAN_FACTORY", newFactory_), "MLV502M:INVALID_FACTORY"); | ||
|
||
_setFactory(newFactory_); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
contracts/interfaces/IRefinancer.sol → contracts/interfaces/IMapleRefinancer.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env bash | ||
|
||
while getopts p: flag | ||
do | ||
case "${flag}" in | ||
p) profile=${OPTARG};; | ||
esac | ||
done | ||
|
||
export FOUNDRY_PROFILE=production | ||
|
||
sizes=$(forge build --sizes) | ||
|
||
names=($(cat ./configs/package.yaml | grep " contractName:" | sed -r 's/.{18}//')) | ||
|
||
fail=false | ||
|
||
for i in "${!names[@]}"; do | ||
line=$(echo "$sizes" | grep -w "${names[i]}") | ||
|
||
if [[ $line == *"-"* ]]; then | ||
echo "${names[i]} is too large" | ||
fail=true | ||
fi | ||
done | ||
|
||
if $fail | ||
then | ||
echo "Contract size check failed" | ||
exit 1 | ||
else | ||
echo "Contract size check passed" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.