diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-07-14 05:06:48 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-07-23 23:00:23 +0800 |
commit | 66ab0100554d4b044c7e12c667bb2afd57773302 (patch) | |
tree | ce29694570f7150fa7acf0fb812a9608a59b6cdd /packages/contracts | |
parent | 6fb157488cf337a1b3c96fc4a9b04d81098bd27d (diff) | |
download | dexon-0x-contracts-66ab0100554d4b044c7e12c667bb2afd57773302.tar.gz dexon-0x-contracts-66ab0100554d4b044c7e12c667bb2afd57773302.tar.zst dexon-0x-contracts-66ab0100554d4b044c7e12c667bb2afd57773302.zip |
Update percentage constants
Diffstat (limited to 'packages/contracts')
3 files changed, 18 insertions, 17 deletions
diff --git a/packages/contracts/src/2.0.0/forwarder/MixinWeth.sol b/packages/contracts/src/2.0.0/forwarder/MixinWeth.sol index 1d0c315f5..44cd9cdf9 100644 --- a/packages/contracts/src/2.0.0/forwarder/MixinWeth.sol +++ b/packages/contracts/src/2.0.0/forwarder/MixinWeth.sol @@ -29,9 +29,9 @@ contract MixinWeth is MWeth { - uint256 constant internal PERCENTAGE_DENOMINATOR = 10000; // 9800 == 98%, 10000 == 100% - uint256 constant internal MAX_FEE_PERCENTAGE = 500; // 5% - uint256 constant internal MAX_WETH_FILL_PERCENTAGE = 9500; // 95% + uint256 constant internal PERCENTAGE_DENOMINATOR = 10**18; + uint256 constant internal MAX_FEE_PERCENTAGE = 5 * PERCENTAGE_DENOMINATOR / 100; // 5% + uint256 constant internal MAX_WETH_FILL_PERCENTAGE = 95 * PERCENTAGE_DENOMINATOR / 100; // 95% /// @dev Default payabale function, this allows us to withdraw WETH function () diff --git a/packages/contracts/src/2.0.0/protocol/Exchange/MixinWrapperFunctions.sol b/packages/contracts/src/2.0.0/protocol/Exchange/MixinWrapperFunctions.sol index 567f26c52..0abf53d02 100644 --- a/packages/contracts/src/2.0.0/protocol/Exchange/MixinWrapperFunctions.sol +++ b/packages/contracts/src/2.0.0/protocol/Exchange/MixinWrapperFunctions.sol @@ -32,6 +32,7 @@ contract MixinWrapperFunctions is LibAbiEncoder, MExchangeCore { + /// @dev Fills the input order. Reverts if exact takerAssetFillAmount not filled. /// @param order Order struct containing order specifications. /// @param takerAssetFillAmount Desired amount of takerAsset to sell. diff --git a/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibOrder.sol b/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibOrder.sol index 68f2c8aed..4031ff26b 100644 --- a/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibOrder.sol +++ b/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibOrder.sol @@ -103,20 +103,20 @@ contract LibOrder is bytes32 takerAssetDataHash = keccak256(order.takerAssetData); // Assembly for more efficiently computing: - // keccak256(abi.encode( - // order.makerAddress, - // order.takerAddress, - // order.feeRecipientAddress, - // order.senderAddress, - // order.makerAssetAmount, - // order.takerAssetAmount, - // order.makerFee, - // order.takerFee, - // order.expirationTimeSeconds, - // order.salt, - // keccak256(order.makerAssetData), - // keccak256(order.takerAssetData) - // )); + // keccak256(abi.encode( + // order.makerAddress, + // order.takerAddress, + // order.feeRecipientAddress, + // order.senderAddress, + // order.makerAssetAmount, + // order.takerAssetAmount, + // order.makerFee, + // order.takerFee, + // order.expirationTimeSeconds, + // order.salt, + // keccak256(order.makerAssetData), + // keccak256(order.takerAssetData) + // )); assembly { // Backup |