-
Notifications
You must be signed in to change notification settings - Fork 5
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 #52 from Into-the-Fathom/mainnet-deployment-reaudit
Reaudit Fixes with Changes in Multisig Scripts
Showing
170 changed files
with
7,337 additions
and
2,472 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
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
/contracts/oraclize-api | ||
/contracts/common | ||
/contracts/dao/test |
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
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,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 {} |
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 |
---|---|---|
@@ -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 {} |
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
Large diffs are not rendered by default.
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
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
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,11 @@ | ||
// SPDX-License-Identifier: AGPL 3.0 | ||
// Copyright Fathom 2022 | ||
pragma solidity 0.8.16; | ||
|
||
interface IEmergencyStop { | ||
/** | ||
* @dev A multisig can stop this contract. Once stopped we will have to migrate. | ||
* Once this function is called, the contract cannot be made live again. | ||
*/ | ||
function emergencyStop() external; | ||
} |
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: AGPL 3.0 | ||
// Copyright Fathom 2022 | ||
pragma solidity 0.8.16; | ||
|
||
interface IRelay { | ||
/** | ||
* @dev Relays a transaction or function call to an arbitrary target. In cases where the governance executor | ||
* is some contract other than the governor itself, like when using a timelock, this function can be invoked | ||
* in a governance proposal to recover tokens that was sent to the governor contract by mistake. | ||
* Note that if the executor is simply the governor itself, use of `relay` is redundant. | ||
*/ | ||
function relayERC20(address target, bytes calldata data) external; | ||
|
||
/** | ||
* @dev Relays a transaction or function call to an arbitrary target. In cases where the governance executor | ||
* is some contract other than the governor itself, like when using a timelock, this function can be invoked | ||
* in a governance proposal to recover Ether that was sent to the governor contract by mistake. | ||
* Note that if the executor is simply the governor itself, use of `relay` is redundant. | ||
*/ | ||
function relayNativeToken( | ||
address target, | ||
uint256 value, | ||
bytes calldata data | ||
) external payable; | ||
} |
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,19 @@ | ||
// SPDX-License-Identifier: AGPL 3.0 | ||
// Copyright Fathom 2022 | ||
pragma solidity 0.8.16; | ||
|
||
interface ISupportingTokens { | ||
/** | ||
* @dev Adds supporting tokens so that if there are tokens then it can be transferred | ||
* Only Governance is able to access this function. | ||
* It has to go through proposal and successful voting for execution. | ||
*/ | ||
function addSupportingToken(address _token) external; | ||
|
||
/** | ||
* @dev Removes supporting tokens | ||
* Only Governance is able to access this function. | ||
* It has to go through proposal and successful voting for execution. | ||
*/ | ||
function removeSupportingToken(address _token) external; | ||
} |
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
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 |
---|---|---|
@@ -1,20 +1,21 @@ | ||
// SPDX-License-Identifier: AGPL 3.0 | ||
// Copyright Fathom 2022 | ||
|
||
pragma solidity ^0.8.13; | ||
pragma solidity 0.8.16; | ||
|
||
import "../StakingStructs.sol"; | ||
|
||
interface IRewardsHandler { | ||
function validateStreamParameters( | ||
address streamOwner, | ||
address rewardToken, | ||
uint256 percentToTreasury, | ||
uint256 maxDepositAmount, | ||
uint256 minDepositAmount, | ||
uint256[] memory scheduleTimes, | ||
uint256[] memory scheduleRewards, | ||
uint256[] calldata scheduleTimes, | ||
uint256[] calldata scheduleRewards, | ||
uint256 tau | ||
) external view; | ||
|
||
function getRewardsAmount(Schedule memory schedule, uint256 lastUpdate) external view returns (uint256); | ||
function getRewardsAmount(Schedule calldata schedule, uint256 lastUpdate) external view returns (uint256); | ||
} |
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 was deleted.
Oops, something went wrong.
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
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
Large diffs are not rendered by default.
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
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,7 @@ | ||
// SPDX-License-Identifier: AGPL 3.0 | ||
// Original Copyright Aurora | ||
// Copyright Fathom 2022 | ||
pragma solidity 0.8.16; | ||
import "../../common/proxy/transparent/ProxyAdmin.sol"; | ||
|
||
contract VaultProxyAdminMigrate is ProxyAdmin {} |
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,13 @@ | ||
// SPDX-License-Identifier: AGPL 3.0 | ||
// Original Copyright Aurora | ||
// Copyright Fathom 2022 | ||
pragma solidity 0.8.16; | ||
import "../../common/proxy/transparent/TransparentUpgradeableProxy.sol"; | ||
|
||
contract VaultProxyMigrate is TransparentUpgradeableProxy { | ||
constructor( | ||
address _logic, | ||
address admin_, | ||
bytes memory _data | ||
) payable TransparentUpgradeableProxy(_logic, admin_, _data) {} | ||
} |
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,158 @@ | ||
// SPDX-License-Identifier: MIT | ||
// Original Copyright Uniswap | ||
// Copyright Fathom 2022 | ||
|
||
pragma solidity >=0.6.2; | ||
|
||
interface IUniswapV2Router01 { | ||
function factory() external pure returns (address); | ||
|
||
function WETH() external pure returns (address); | ||
|
||
function addLiquidity( | ||
address tokenA, | ||
address tokenB, | ||
uint256 amountADesired, | ||
uint256 amountBDesired, | ||
uint256 amountAMin, | ||
uint256 amountBMin, | ||
address to, | ||
uint256 deadline | ||
) | ||
external | ||
returns ( | ||
uint256 amountA, | ||
uint256 amountB, | ||
uint256 liquidity | ||
); | ||
|
||
function addLiquidityETH( | ||
address token, | ||
uint256 amountTokenDesired, | ||
uint256 amountTokenMin, | ||
uint256 amountETHMin, | ||
address to, | ||
uint256 deadline | ||
) | ||
external | ||
payable | ||
returns ( | ||
uint256 amountToken, | ||
uint256 amountETH, | ||
uint256 liquidity | ||
); | ||
|
||
function removeLiquidity( | ||
address tokenA, | ||
address tokenB, | ||
uint256 liquidity, | ||
uint256 amountAMin, | ||
uint256 amountBMin, | ||
address to, | ||
uint256 deadline | ||
) external returns (uint256 amountA, uint256 amountB); | ||
|
||
function removeLiquidityETH( | ||
address token, | ||
uint256 liquidity, | ||
uint256 amountTokenMin, | ||
uint256 amountETHMin, | ||
address to, | ||
uint256 deadline | ||
) external returns (uint256 amountToken, uint256 amountETH); | ||
|
||
function removeLiquidityWithPermit( | ||
address tokenA, | ||
address tokenB, | ||
uint256 liquidity, | ||
uint256 amountAMin, | ||
uint256 amountBMin, | ||
address to, | ||
uint256 deadline, | ||
bool approveMax, | ||
uint8 v, | ||
bytes32 r, | ||
bytes32 s | ||
) external returns (uint256 amountA, uint256 amountB); | ||
|
||
function removeLiquidityETHWithPermit( | ||
address token, | ||
uint256 liquidity, | ||
uint256 amountTokenMin, | ||
uint256 amountETHMin, | ||
address to, | ||
uint256 deadline, | ||
bool approveMax, | ||
uint8 v, | ||
bytes32 r, | ||
bytes32 s | ||
) external returns (uint256 amountToken, uint256 amountETH); | ||
|
||
function swapExactTokensForTokens( | ||
uint256 amountIn, | ||
uint256 amountOutMin, | ||
address[] calldata path, | ||
address to, | ||
uint256 deadline | ||
) external returns (uint256[] memory amounts); | ||
|
||
function swapTokensForExactTokens( | ||
uint256 amountOut, | ||
uint256 amountInMax, | ||
address[] calldata path, | ||
address to, | ||
uint256 deadline | ||
) external returns (uint256[] memory amounts); | ||
|
||
function swapExactETHForTokens( | ||
uint256 amountOutMin, | ||
address[] calldata path, | ||
address to, | ||
uint256 deadline | ||
) external payable returns (uint256[] memory amounts); | ||
|
||
function swapTokensForExactETH( | ||
uint256 amountOut, | ||
uint256 amountInMax, | ||
address[] calldata path, | ||
address to, | ||
uint256 deadline | ||
) external returns (uint256[] memory amounts); | ||
|
||
function swapExactTokensForETH( | ||
uint256 amountIn, | ||
uint256 amountOutMin, | ||
address[] calldata path, | ||
address to, | ||
uint256 deadline | ||
) external returns (uint256[] memory amounts); | ||
|
||
function swapETHForExactTokens( | ||
uint256 amountOut, | ||
address[] calldata path, | ||
address to, | ||
uint256 deadline | ||
) external payable returns (uint256[] memory amounts); | ||
|
||
function quote( | ||
uint256 amountA, | ||
uint256 reserveA, | ||
uint256 reserveB | ||
) external pure returns (uint256 amountB); | ||
|
||
function getAmountOut( | ||
uint256 amountIn, | ||
uint256 reserveIn, | ||
uint256 reserveOut | ||
) external pure returns (uint256 amountOut); | ||
|
||
function getAmountIn( | ||
uint256 amountOut, | ||
uint256 reserveIn, | ||
uint256 reserveOut | ||
) external pure returns (uint256 amountIn); | ||
|
||
function getAmountsOut(uint256 amountIn, address[] calldata path) external view returns (uint256[] memory amounts); | ||
|
||
function getAmountsIn(uint256 amountOut, address[] calldata path) external view returns (uint256[] memory amounts); | ||
} |
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,54 @@ | ||
// SPDX-License-Identifier: MIT | ||
// Original Copyright Uniswap | ||
// Copyright Fathom 2022 | ||
|
||
pragma solidity >=0.6.2; | ||
|
||
import "./IUniswapV2Router01.sol"; | ||
|
||
interface IUniswapV2Router02 is IUniswapV2Router01 { | ||
function removeLiquidityETHSupportingFeeOnTransferTokens( | ||
address token, | ||
uint256 liquidity, | ||
uint256 amountTokenMin, | ||
uint256 amountETHMin, | ||
address to, | ||
uint256 deadline | ||
) external returns (uint256 amountETH); | ||
|
||
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( | ||
address token, | ||
uint256 liquidity, | ||
uint256 amountTokenMin, | ||
uint256 amountETHMin, | ||
address to, | ||
uint256 deadline, | ||
bool approveMax, | ||
uint8 v, | ||
bytes32 r, | ||
bytes32 s | ||
) external returns (uint256 amountETH); | ||
|
||
function swapExactTokensForTokensSupportingFeeOnTransferTokens( | ||
uint256 amountIn, | ||
uint256 amountOutMin, | ||
address[] calldata path, | ||
address to, | ||
uint256 deadline | ||
) external; | ||
|
||
function swapExactETHForTokensSupportingFeeOnTransferTokens( | ||
uint256 amountOutMin, | ||
address[] calldata path, | ||
address to, | ||
uint256 deadline | ||
) external payable; | ||
|
||
function swapExactTokensForETHSupportingFeeOnTransferTokens( | ||
uint256 amountIn, | ||
uint256 amountOutMin, | ||
address[] calldata path, | ||
address to, | ||
uint256 deadline | ||
) external; | ||
} |
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,10 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-or-later | ||
pragma solidity 0.8.16; | ||
|
||
interface IProxyRegistry { | ||
function proxies(address) external view returns (address); | ||
|
||
function build(address) external returns (address); | ||
|
||
function isProxy(address) external view returns (bool); | ||
} |
Oops, something went wrong.