Update project dependencies to latest versions (#283)

* Update dependencies
* Apply prettier format
This commit is contained in:
Gerardo Nardelli 2019-09-09 18:27:45 -03:00 committed by Alexander Kolotov
parent 83900ea971
commit f7265bfee4
14 changed files with 1730 additions and 7376 deletions

View File

@ -2,5 +2,13 @@
"semi": false,
"singleQuote": true,
"printWidth": 120,
"bracketSpacing": true
"bracketSpacing": true,
"overrides": [
{
"files": "*.sol",
"options": {
"singleQuote": false
}
}
]
}

View File

@ -167,7 +167,7 @@ library Message {
bytes memory bstr = new bytes(length);
uint256 k = length - 1;
while (i != 0) {
bstr[k--] = bytes1(48 + i % 10);
bstr[k--] = bytes1(48 + (i % 10));
i /= 10;
}
return string(bstr);

View File

@ -140,11 +140,11 @@ contract BasicHomeBridge is EternalStorage, Validatable, BasicBridge, BasicToken
}
function markAsProcessed(uint256 _v) internal pure returns (uint256) {
return _v | 2 ** 255;
return _v | (2**255);
}
function isAlreadyProcessed(uint256 _number) public pure returns (bool) {
return _number & 2 ** 255 == 2 ** 255;
return _number & (2**255) == 2**255;
}
function numMessagesSigned(bytes32 _message) public view returns (uint256) {

View File

@ -6,7 +6,7 @@ import "openzeppelin-solidity/contracts/AddressUtils.sol";
contract ForeignAMBErc677ToErc677 is BasicAMBErc677ToErc677 {
function executeActionOnBridgedTokens(address _recipient, uint256 _value) internal {
uint256 value = _value.div(10 ** decimalShift());
uint256 value = _value.div(10**decimalShift());
erc677token().transfer(_recipient, value);
}

View File

@ -6,7 +6,7 @@ import "openzeppelin-solidity/contracts/AddressUtils.sol";
contract HomeAMBErc677ToErc677 is BasicAMBErc677ToErc677 {
function executeActionOnBridgedTokens(address _recipient, uint256 _value) internal {
uint256 value = _value.mul(10 ** decimalShift());
uint256 value = _value.mul(10**decimalShift());
IBurnableMintableERC677Token(erc677token()).mint(_recipient, value);
}

View File

@ -84,7 +84,7 @@ contract BasicHomeAMB is BasicAMB, MessageDelivery, MessageProcessor {
}
function isAlreadyProcessed(uint256 _number) public pure returns (bool) {
return _number & 2 ** 255 == 2 ** 255;
return _number & (2**255) == 2**255;
}
function numMessagesSigned(bytes32 _message) public view returns (uint256) {
@ -133,7 +133,7 @@ contract BasicHomeAMB is BasicAMB, MessageDelivery, MessageProcessor {
}
function markAsProcessed(uint256 _v) internal pure returns (uint256) {
return _v | 2 ** 255;
return _v | (2**255);
}
function setAffirmationsSigned(bytes32 _hash, bool _status) internal {

View File

@ -52,7 +52,7 @@ contract BasicForeignBridgeErcToErc is BasicForeignBridge {
bytes32 /*_txHash*/
) internal returns (bool) {
setTotalExecutedPerDay(getCurrentDay(), totalExecutedPerDay(getCurrentDay()).add(_amount));
uint256 amount = _amount.div(10 ** decimalShift());
uint256 amount = _amount.div(10**decimalShift());
return erc20token().transfer(_recipient, amount);
}

View File

@ -146,7 +146,7 @@ contract HomeBridgeErcToErc is
function onExecuteAffirmation(address _recipient, uint256 _value, bytes32 txHash) internal returns (bool) {
setTotalExecutedPerDay(getCurrentDay(), totalExecutedPerDay(getCurrentDay()).add(_value));
uint256 valueToMint = _value.mul(10 ** decimalShift());
uint256 valueToMint = _value.mul(10**decimalShift());
address feeManager = feeManagerContract();
if (feeManager != address(0)) {
uint256 fee = calculateFee(valueToMint, false, feeManager, FOREIGN_FEE);

View File

@ -56,7 +56,7 @@ contract ForeignBridgeErcToNative is BasicForeignBridge, ERC20Bridge {
bytes32 /*_txHash*/
) internal returns (bool) {
setTotalExecutedPerDay(getCurrentDay(), totalExecutedPerDay(getCurrentDay()).add(_amount));
uint256 amount = _amount.div(10 ** decimalShift());
uint256 amount = _amount.div(10**decimalShift());
return erc20token().transfer(_recipient, amount);
}

View File

@ -161,7 +161,7 @@ contract HomeBridgeErcToNative is
setTotalExecutedPerDay(getCurrentDay(), totalExecutedPerDay(getCurrentDay()).add(_value));
IBlockReward blockReward = blockRewardContract();
require(blockReward != address(0));
uint256 valueToMint = _value.mul(10 ** decimalShift());
uint256 valueToMint = _value.mul(10**decimalShift());
address feeManager = feeManagerContract();
if (feeManager != address(0)) {
uint256 fee = calculateFee(valueToMint, false, feeManager, FOREIGN_FEE);

View File

@ -118,7 +118,7 @@ contract ForeignBridgeNativeToErc is
function onExecuteMessage(address _recipient, uint256 _amount, bytes32 _txHash) internal returns (bool) {
setTotalExecutedPerDay(getCurrentDay(), totalExecutedPerDay(getCurrentDay()).add(_amount));
uint256 valueToMint = _amount.div(10 ** decimalShift());
uint256 valueToMint = _amount.div(10**decimalShift());
address feeManager = feeManagerContract();
if (feeManager != address(0)) {
uint256 fee = calculateFee(valueToMint, false, feeManager, HOME_FEE);

View File

@ -135,7 +135,7 @@ contract HomeBridgeNativeToErc is EternalStorage, BasicHomeBridge, RewardableHom
function onExecuteAffirmation(address _recipient, uint256 _value, bytes32 txHash) internal returns (bool) {
setTotalExecutedPerDay(getCurrentDay(), totalExecutedPerDay(getCurrentDay()).add(_value));
uint256 valueToTransfer = _value.mul(10 ** decimalShift());
uint256 valueToTransfer = _value.mul(10**decimalShift());
address feeManager = feeManagerContract();
if (feeManager != address(0)) {

9040
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -23,29 +23,29 @@
"@0x/sol-coverage": "^3.0.11",
"@0x/sol-trace": "^2.0.19",
"@0x/subproviders": "^5.0.3",
"ganache-cli": "^6.4.3",
"istanbul": "^0.4.5",
"openzeppelin-solidity": "1.12.0",
"truffle": "^5.0.18"
"truffle": "^5.0.35"
},
"devDependencies": {
"@codechecks/client": "^0.1.5",
"@codechecks/client": "^0.1.9",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"chai-bn": "^0.1.1",
"coveralls": "^3.0.4",
"eslint": "^5.16.0",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-config-prettier": "^4.2.0",
"eslint-plugin-import": "^2.17.2",
"eslint-plugin-node": "^9.0.1",
"coveralls": "^3.0.6",
"eslint": "^6.3.0",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-config-prettier": "^6.2.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-prettier": "^3.0.1",
"eth-gas-reporter": "^0.2.9",
"eth-gas-reporter": "^0.2.11",
"ganache-cli": "^6.6.0",
"istanbul": "^0.4.5",
"nodemon": "^1.17.3",
"prettier": "^1.17.1",
"prettier-plugin-solidity": "^1.0.0-alpha.27",
"solhint": "^2.1.2",
"prettier": "^1.18.2",
"prettier-plugin-solidity": "^1.0.0-alpha.32",
"solhint": "^2.2.0",
"solhint-plugin-prettier": "0.0.3",
"truffle-flattener": "^1.2.3"
"truffle-flattener": "^1.4.2"
}
}