Skip to content

Commit

Permalink
Merge pull request #53 from Into-the-Fathom/dev
Browse files Browse the repository at this point in the history
1.1.0
  • Loading branch information
TonioMacaronio authored Apr 17, 2023
2 parents b95c4a1 + a4af529 commit 2c40cfa
Show file tree
Hide file tree
Showing 170 changed files with 7,337 additions and 2,472 deletions.
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,5 @@ privateKey
yarn.lock
package-lock.json
bin

subgraph/build/
subgraph/generated/
subgraph/node_modules/
addresses.json
/config
11 changes: 6 additions & 5 deletions .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@
"extends": "solhint:recommended",
"plugins": [],
"rules": {
"compiler-version": ["error",">=0.8.0 <0.9.0"],
"max-line-length": ["error",120],
"compiler-version": ["error","0.8.16"],
"max-line-length": ["error", 150],
"reason-string": ["error", {"maxLength": 96}],
"func-visibility": ["error", {"ignoreConstructors": true}],
"not-rely-on-time": "error",
"ordering": "error",
"comprehensive-interface": "error",
"func-param-name-mixedcase": "error",
"modifier-name-mixedcase": "error",
"code-complexity": ["error",7],
"function-max-lines": ["error",50],
"code-complexity": ["error", 7],
"function-max-lines": ["error", 50],
"const-name-snakecase": "error",
"no-complex-fallback": "off",
"no-inline-assembly": "off",
"private-vars-leading-underscore": "off",
"avoid-low-level-calls": "off",
"no-empty-blocks": "off",
"max-states-count": "off"
"max-states-count": "off",
"no-global-import": "off"
}
}
3 changes: 2 additions & 1 deletion .solhintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/contracts/oraclize-api
/contracts/common
/contracts/dao/test
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Fathom project staking, governance and treasury smart contracts for EVM compatib
- node v16.4.0
- npm v7.18.1
- CoralX v0.2.0
- Solidity =0.8.13 (solc)
- Solidity =0.8.16 (solc)
- Ganache CLI v6.12.2 (ganache-core: 2.13.2)

## Setup
Expand Down Expand Up @@ -53,8 +53,8 @@ $ npm run migrate-reset
# Deploy to the apothem
$ npm run migrate-reset-apothem

# Deploy to the goerli
$ npm run migrate-reset-goerli
# Deploy to the sepolia
$ npm run migrate-reset-sepolia

# Deploy to the xdc
$ npm run migrate-reset-xdc
Expand Down
8 changes: 8 additions & 0 deletions contracts/common/SafeERC20Staking.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ import "./Address.sol";
library SafeERC20Staking {
using Address for address;

function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}

function safeTransferFrom(
IERC20 token,
address from,
Expand Down
1 change: 0 additions & 1 deletion contracts/common/math/BoringMath.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ library BoringMath {
c = uint224(a);
}


function to160(uint256 a) internal pure returns (uint208 c) {
require(a <= type(uint160).max, "BoringMath: uint128 Overflow");
c = uint160(a);
Expand Down
2 changes: 1 addition & 1 deletion contracts/common/math/FullMath.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma solidity 0.8.16;

/// @title Contains 512-bit math functions
/// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision
Expand Down
2 changes: 1 addition & 1 deletion contracts/common/proxy/StakingProxy.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL 3.0
// Original Copyright Aurora
// Copyright Fathom 2022
pragma solidity ^0.8.0;
pragma solidity 0.8.16;
import "./transparent/TransparentUpgradeableProxy.sol";

contract StakingProxy is TransparentUpgradeableProxy {
Expand Down
2 changes: 1 addition & 1 deletion contracts/common/proxy/StakingProxyAdmin.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL 3.0
// Original Copyright Aurora
// Copyright Fathom 2022
pragma solidity ^0.8.0;
pragma solidity 0.8.16;
import "./transparent/ProxyAdmin.sol";

contract StakingProxyAdmin is ProxyAdmin {}
2 changes: 1 addition & 1 deletion contracts/common/proxy/VaultProxy.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL 3.0
// Original Copyright Aurora
// Copyright Fathom 2022
pragma solidity ^0.8.0;
pragma solidity 0.8.16;
import "./transparent/TransparentUpgradeableProxy.sol";

contract VaultProxy is TransparentUpgradeableProxy {
Expand Down
2 changes: 1 addition & 1 deletion contracts/common/proxy/VaultProxyAdmin.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL 3.0
// Original Copyright Aurora
// Copyright Fathom 2022
pragma solidity ^0.8.0;
pragma solidity 0.8.16;
import "./transparent/ProxyAdmin.sol";

contract VaultProxyAdmin is ProxyAdmin {}
2 changes: 1 addition & 1 deletion contracts/common/proxy/transparent/ProxyAdmin.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/transparent/ProxyAdmin.sol)

pragma solidity ^0.8.0;
pragma solidity 0.8.16;

import "./TransparentUpgradeableProxy.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
Expand Down
Loading

0 comments on commit 2c40cfa

Please sign in to comment.