Skip to content

Commit 0e07807

Browse files
authored
Mento V3 πŸŽ‰ (#701)
2 parents 4ce201f + 4048a6c commit 0e07807

File tree

225 files changed

+33001
-1177
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

225 files changed

+33001
-1177
lines changed

β€Ž.github/workflows/lint_test.yamlβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727

2828
- name: Install Foundry
2929
uses: foundry-rs/foundry-toolchain@v1
30+
with:
31+
version: v1.3.5
3032

3133
- name: Install Node.js
3234
uses: actions/setup-node@v3

β€Ž.github/workflows/slither.yamlβ€Ž

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,3 @@ jobs:
3535
sarif: results.sarif
3636
fail-on: "low"
3737
continue-on-error: true
38-
- name: Upload SARIF file
39-
uses: github/codeql-action/upload-sarif@v3
40-
with:
41-
sarif_file: ${{ steps.slither.outputs.sarif }}

β€Ž.gitmodulesβ€Ž

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,9 @@
2323
[submodule "lib/forge-std"]
2424
path = lib/forge-std
2525
url = https://github.com/foundry-rs/forge-std
26+
[submodule "lib/BokkyPooBahsDateTimeLibrary"]
27+
path = lib/BokkyPooBahsDateTimeLibrary
28+
url = https://github.com/bokkypoobah/BokkyPooBahsDateTimeLibrary
29+
[submodule "lib/bold"]
30+
path = lib/bold
31+
url = https://github.com/mento-protocol/bold

β€Ž.solhint.jsonβ€Ž

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,30 @@
44
"rules": {
55
"code-complexity": ["error", 8],
66
"compiler-version": ["error", ">=0.5.13"],
7-
"func-visibility": ["error", { "ignoreConstructors": true }],
7+
"func-visibility": [
8+
"error",
9+
{
10+
"ignoreConstructors": true
11+
}
12+
],
813
"function-max-lines": ["error", 120],
914
"gas-custom-errors": "off",
10-
"max-line-length": ["error", 121],
15+
"max-line-length": ["error", 125],
1116
"no-console": "off",
1217
"no-empty-blocks": "off",
1318
"no-global-import": "off",
1419
"not-rely-on-time": "off",
15-
"prettier/prettier": ["error", { "endOfLine": "auto" }],
16-
"reason-string": ["warn", { "maxLength": 64 }]
20+
"prettier/prettier": [
21+
"error",
22+
{
23+
"endOfLine": "auto"
24+
}
25+
],
26+
"reason-string": [
27+
"warn",
28+
{
29+
"maxLength": 64
30+
}
31+
]
1732
}
1833
}

β€ŽLICENSEβ€Ž

Lines changed: 70 additions & 645 deletions
Large diffs are not rendered by default.

β€ŽREADME.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The Mento protocol is a smart contract platform built on the Celo blockchain tha
2222
# Get the latest code
2323
git clone git@github.com:mento-protocol/mento-core.git
2424

25-
# Change directory to the the newly cloned repo
25+
# Change directory to the newly cloned repo
2626
cd mento-core
2727

2828
# Install dev dependencies with yarn

β€Žcontracts/common/SafeERC20MintableBurnable.solβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ import { Address } from "openzeppelin-contracts-next/contracts/utils/Address.sol
1515
library SafeERC20MintableBurnable {
1616
using Address for address;
1717

18+
function safeTransfer(IERC20 token, address to, uint256 value) internal {
19+
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
20+
}
21+
1822
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
1923
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
2024
}

β€Žcontracts/goodDollar/BancorExchangeProvider.solβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.18;
2+
pragma solidity 0.8.19;
33

44
import { IBancorExchangeProvider } from "contracts/interfaces/IBancorExchangeProvider.sol";
55
import { IExchangeProvider } from "contracts/interfaces/IExchangeProvider.sol";

β€Žcontracts/goodDollar/BancorFormula.solβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: SEE LICENSE IN LICENSE
22
// solhint-disable function-max-lines, max-line-length, code-complexity, reason-string
3-
pragma solidity 0.8.18;
3+
pragma solidity 0.8.19;
44

55
/**
66
* @title BancorFormula contract by Bancor

β€Žcontracts/goodDollar/GoodDollarExchangeProvider.solβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-License-Identifier: MIT
2-
pragma solidity 0.8.18;
2+
pragma solidity 0.8.19;
33

44
import { PausableUpgradeable } from "openzeppelin-contracts-upgradeable/contracts/security/PausableUpgradeable.sol";
55

0 commit comments

Comments
Β (0)