-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Note: This is a pre-release version and is subject to change** * Feature: Add support for multi-collateral DAI as a new token * Feature: Allow upgrades for cTokens which have upgradable underlying tokens * Improvement: Allow liquidation of a borrow collateralized in the same kind of token * Improvement: Add support for Erc-20 tokens which have a fee on transfers
- Loading branch information
Showing
161 changed files
with
36,237 additions
and
11,663 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,8 +1,26 @@ | ||
const {execSync} = require('child_process'); | ||
async function moveCoverage(config) { | ||
execSync('mv ./.coverage_artifacts/contracts ./networks/coverage-contracts'); | ||
} | ||
|
||
async function moveCoverageBack() { | ||
execSync('mv ./networks/coverage-contracts ./.coverage_artifacts/contracts'); | ||
} | ||
|
||
module.exports = { | ||
port: 8555, | ||
norpc: true, | ||
testCommand: process.env['TEST_COMMAND'] || 'NETWORK=coverage script/test', | ||
skipFiles: ['FormalMoneyMarket.sol', 'test_contracts'].concat( | ||
providerOpts: | ||
{ // See example coverage settings at https://github.com/sc-forks/solidity-coverage | ||
gas: 0xfffffff, | ||
gasPrice: 0x01 | ||
}, | ||
mocha: { | ||
enableTimeouts: false, | ||
grep: /@gas|@no-cov/, | ||
invert: true | ||
}, | ||
onCompileComplete: moveCoverage, | ||
onTestsComplete: moveCoverageBack, | ||
skipFiles: ['test'].concat( | ||
process.env['SKIP_UNITROLLER'] ? ['Unitroller.sol'] : []), | ||
deepSkip: true | ||
}; |
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,43 @@ | ||
pragma solidity ^0.5.12; | ||
|
||
import "./CErc20.sol"; | ||
|
||
/** | ||
* @title Compound's CErc20Delegate Contract | ||
* @notice CTokens which wrap an EIP-20 underlying and are delegated to | ||
* @author Compound | ||
*/ | ||
contract CErc20Delegate is CErc20, CDelegateInterface { | ||
/** | ||
* @notice Construct an empty delegate | ||
*/ | ||
constructor() public {} | ||
|
||
/** | ||
* @notice Called by the delegator on a delegate to initialize it for duty | ||
* @param data The encoded bytes data for any initialization | ||
*/ | ||
function _becomeImplementation(bytes memory data) public { | ||
// Shh -- currently unused | ||
data; | ||
|
||
// Shh -- we don't ever want this hook to be marked pure | ||
if (false) { | ||
implementation = address(0); | ||
} | ||
|
||
require(msg.sender == admin, "only the admin may call _becomeImplementation"); | ||
} | ||
|
||
/** | ||
* @notice Called by the delegator on a delegate to forfeit its responsibility | ||
*/ | ||
function _resignImplementation() public { | ||
// Shh -- we don't ever want this hook to be marked pure | ||
if (false) { | ||
implementation = address(0); | ||
} | ||
|
||
require(msg.sender == admin, "only the admin may call _resignImplementation"); | ||
} | ||
} |
Oops, something went wrong.