Skip to content

Commit e44bbb2

Browse files
ilanDoronAnyhowclickmanhlx3006ayobuenavista
authored
Development to master (#581)
* Shifted arbitrage check to FeeBurner * Shifted relevant tests from expectedRate to feeBurner * Modified failing test, as it requires less gas to fail * Removed redundan >0 rate check, test for feeBurner * Added test for src==dest token * Istanbul fix, zero rate handling * Arbitrage check shifted to FeeBurner (#433) * Shifted arbitrage check to FeeBurner * Shifted relevant tests from expectedRate to feeBurner * Modified failing test, as it requires less gas to fail * Removed redundan >0 rate check, test for feeBurner * Added test for src==dest token * Revert "Merge branch 'clicky/zero_rate' into development" This reverts commit 795d2f1d28131534604586b7786cba4e79f21e04, reversing changes made to 80af391c738395ac57017f4e18eab904869cf6f7. * Clicky/buidl integration (#459) * Pulling stuff from KN/clicky/buidl-integration branch * Pull changes from expected rate and fee burner * Update kyberNetwork test file * Update kyberNetwork.js * Merge Mike's PR on enhanced step functions (#458) * [WIP] Add new conversion rate contract with step function enhancement (#416) * [WIP] Add new conversion rate contract with step function enhancement * Add more tests to kyberReserve for testing new conversion rate contract * Add more tests for kybetNetwork with new conversion rate contract * Add verify qty and imbalance step function amounts must be increasing * Add case set qty and balance step func with only one or zero element * Check for qty step function all amounts are non negative * Update conversion rate contract and kyber network tests * Fallback to old logics when qty is 0 * Update new conversion rate with inherite from old one, update logics for some edge cases and tests * Fixed typo * Add check for empty step function before executing step function * Fix issue when qty is negative and greater than all step qty * Fix issue with executing step func with 0 as qty (#417) * Remove unnecessary tests in conversionRate2, add more cases to test for new execute step function * Fix issue with execute step func for 0 qty * expose getImbalance function in conversionRate2.sol file (#419) * Update conversion rate contract 2 with new logics for executing step function * Resolve some comments, change name new conversion rates contract to EnhancedStepFunctions * Remove qty step function, compress data for imbalance steps * Resolve solhint max line length * Avoid modifying function params in execute step func * Update comments for each test case of getting correct bps for step func * Update with some comments, add more tests * Add await keyword * Update some comments, fix some old tests in kyber reserve * Fix wrong calculate imbalance of token in reserve test * Change default max imbalance to return when overflow, fix some tests with missing await keyword * Blocking setting qty step function in new conversion rate * Update execute step func with blocking rate, remove updatedRateBlock in getImbalance * Remove redundant stepX value in last step * Add check data when encoding step func, using MAX_VAL as default for last step X * Add checking for max value of step X and tests * Add check for max bps adjustment, check max_imbalance value test * Fixed Failing Tests (#462) * Istanbul fix * Fixed failing tests as per Ilan's feedback * Fixed failing tests * Minor fixes * Minor fixes * Sync enhanced step functions test file * Reduce getDecimals call in findBestRateTokenToToken in network contract (#467) * Reduce getDecimals call in findBestRateTokenToToken in network contract * Fix new line end file * Remove some tests in utils3 * Avoid decimals call when calling handleFees on FeeBurner (#468) * Ilan/merge master (#460) * reserve deployment scripts (#233) * reserve deployment scripts * read valid block duration from config file. (#423) * Weth Reserve Implementation (#304) * Weth Reserve Implementation Includes testing. Also includes an addition in helper to make throw catching more neat. * Add weth reserve test * Add deploy script for oasis reserve * Organize folder structure and update WrapConversionRate.sol #441 && #452 (#453) * Organize folder structure according to issue #441 this includes organizing audit folder and organizing reserves. Remove multisig support from WrapConversionRate.sol according to issue #452 * enable admin to call transfer admin of base contract * enable wrapConversionRate to control all adminOnly functions in conversionRate (#461) * Ilan/modify wrap conversion rate (#466) * enable wrapConversionRate to control all adminOnly functions in conversionRate * enable wrap conversion rate to control all admin functions in conversion rate contract * set admin as msg.sender. to follow base contract logic * remove redundant test. adopt to chainge in admin logic * add CR LF * rename folders. (#469) * rename folders. (remove contract from folder name.) * reset package - lock * move new mock contracts to mock folder. * create web3 object * Upgraded to ganache-cli@istanbul * Removed header * Istanbul fix (#457) * Return zero rate for same src and dest token (#475) * Return zero rate for same src & dest token * Removed unnecessary tests * Echo fork choice, fix broken logic * Try committing new package-lock.json * Added more info * Bumped to node v12.13.0 * Update package fix npm (#474) * Update package fix npm * Update package-lock file * Remove unused packages * Removed eslint * Add colour for better readability of fork choice * Add spacing between example commands * Resolve package-lock conflict * Revert "Bumped to node v12.13.0" This reverts commit 85cb734ed5bfae4fdc5fc0dc8c8dfcc8c3c426ed. * Fixed conflicting files * Revert "Merge branch 'clicky/ganacheIstanbul' into development" This reverts commit 654a1c3e7971319bd802df0cd70daf32337caa95, reversing changes made to 6c0a21c59eb55b44cfe8616a513e7e76533fc9c5. * Upgrade to ganache-cli@istanbul for testing with Istanbul fork (#482) * Added colour and newline to fork choice * Add node and npm version used * Removed eslint * Removed eslint * Got latest changes from Mike's PR * added colour and newline to fork choice * Fix coloring (I hope) * Changed BG to make text stand out * handle zero qty in get rate permission less reserve (#472) * handle zero qty in get rate permission less reserve * undo wrong change * Increase gas limit for 1 test due to Istanbul (#487) * [455] Enable unlist orderbook permissionless reserve (#485) * Add comments in FeeBurner for KNC decimals (#489) * Revert "Arbitrage check shifted to FeeBurner" (#488) * Revert "Arbitrage check shifted to FeeBurner (#433)" This reverts commit 80af391c738395ac57017f4e18eab904869cf6f7. * reverse un needed test changes for kyber NEtwork * Zero Src Qty Handling (#483) * Initial commit for zero rate handling. Need to rewrite tests * Improved comment to code * Modified getConversionRate function to require srcAmt > 0 * Removed tests, added one * Updated contracts as per feedback * Updated comment in test file * Added fix to expectedRateSmallQty * Remove extra = * Add additional section to check network.getExpectedRate doesn't revert as well * Removed redundant tests due to zero rate handling in network contract (#494) * update solidity coverage version (#491) * Added new deployment script and input files (#495) * Ilan/add rates getter (#493) * update solidity coverage version * add getter function for rates * update getter API and return values, add tests * Clicky/rename compile file (#496) * renamed compileOutput.js to compileContracts.js, added more contracts for reserveDeployer * Renamed compileOutput -> compileContracts * Minor spelling edit * update addresses for deployment (#497) * remove multi sig support. add admin functionality (#498) * remove multi sig support. add admin functionality * refactor wrapper contracts, update tests * update tests according to PR comments, add one missing check * Add some comments * Revert "[455] Enable unlist orderbook permissionless reserve (#485)" (#504) This reverts commit 8b63c0ea023b7965a7c00e452279cf52e03f32f2. * Fix deployment script after staging deployment (#505) * Added new deployment script and input files * Remove old file * Added contract instantiation if deployer script breaks halfway through * avoid query to uniswap with zero rate (#510) * avoid query to uniswap with zero rate * test situation where trade result is 0 * enable setting min record resultion in conversion rates using wrapper (#513) * enable setting min record resultion in conversion rates using wrapper * linting, and add missing test * fix uniswap bridge for small amounts src qty (1) (#518) * fix uniswap bridge for smal amounts src qty (1) * avoid reading fee twice * fix uniswap deployer script * Ilan/deployment helper (#516) * some deployment changes, and helper contract" " * add kyber uniswap bridge to compilation. remove wrap conversion rate * small fixes in deployer * Add CR LF * Ilan/merge master (#519) * update some packages. fix solc version to 0.4.18 (#503) * fixed FPR deployment script (#508) * add smartdec audit for APR * use correct package-lock * Ilan/master to development (#525) * Development to Master. Istanbul changes. buidl. (#471) * Shifted arbitrage check to FeeBurner * Shifted relevant tests from expectedRate to feeBurner * Modified failing test, as it requires less gas to fail * Removed redundan >0 rate check, test for feeBurner * Added test for src==dest token * Istanbul fix, zero rate handling * Arbitrage check shifted to FeeBurner (#433) * Shifted arbitrage check to FeeBurner * Shifted relevant tests from expectedRate to feeBurner * Modified failing test, as it requires less gas to fail * Removed redundan >0 rate check, test for feeBurner * Added test for src==dest token * Revert "Merge branch 'clicky/zero_rate' into development" This reverts commit 795d2f1d28131534604586b7786cba4e79f21e04, reversing changes made to 80af391c738395ac57017f4e18eab904869cf6f7. * Clicky/buidl integration (#459) * Pulling stuff from KN/clicky/buidl-integration branch * Pull changes from expected rate and fee burner * Update kyberNetwork test file * Update kyberNetwork.js * Merge Mike's PR on enhanced step functions (#458) * [WIP] Add new conversion rate contract with step function enhancement (#416) * [WIP] Add new conversion rate contract with step function enhancement * Add more tests to kyberReserve for testing new conversion rate contract * Add more tests for kybetNetwork with new conversion rate contract * Add verify qty and imbalance step function amounts must be increasing * Add case set qty and balance step func with only one or zero element * Check for qty step function all amounts are non negative * Update conversion rate contract and kyber network tests * Fallback to old logics when qty is 0 * Update new conversion rate with inherite from old one, update logics for some edge cases and tests * Fixed typo * Add check for empty step function before executing step function * Fix issue when qty is negative and greater than all step qty * Fix issue with executing step func with 0 as qty (#417) * Remove unnecessary tests in conversionRate2, add more cases to test for new execute step function * Fix issue with execute step func for 0 qty * expose getImbalance function in conversionRate2.sol file (#419) * Update conversion rate contract 2 with new logics for executing step function * Resolve some comments, change name new conversion rates contract to EnhancedStepFunctions * Remove qty step function, compress data for imbalance steps * Resolve solhint max line length * Avoid modifying function params in execute step func * Update comments for each test case of getting correct bps for step func * Update with some comments, add more tests * Add await keyword * Update some comments, fix some old tests in kyber reserve * Fix wrong calculate imbalance of token in reserve test * Change default max imbalance to return when overflow, fix some tests with missing await keyword * Blocking setting qty step function in new conversion rate * Update execute step func with blocking rate, remove updatedRateBlock in getImbalance * Remove redundant stepX value in last step * Add check data when encoding step func, using MAX_VAL as default for last step X * Add checking for max value of step X and tests * Add check for max bps adjustment, check max_imbalance value test * Fixed Failing Tests (#462) * Istanbul fix * Fixed failing tests as per Ilan's feedback * Fixed failing tests * Minor fixes * Minor fixes * Sync enhanced step functions test file * Reduce getDecimals call in findBestRateTokenToToken in network contract (#467) * Reduce getDecimals call in findBestRateTokenToToken in network contract * Fix new line end file * Remove some tests in utils3 * Avoid decimals call when calling handleFees on FeeBurner (#468) * Ilan/merge master (#460) * reserve deployment scripts (#233) * reserve deployment scripts * read valid block duration from config file. (#423) * Weth Reserve Implementation (#304) * Weth Reserve Implementation Includes testing. Also includes an addition in helper to make throw catching more neat. * Add weth reserve test * Add deploy script for oasis reserve * Organize folder structure and update WrapConversionRate.sol #441 && #452 (#453) * Organize folder structure according to issue #441 this includes organizing audit folder and organizing reserves. Remove multisig support from WrapConversionRate.sol according to issue #452 * enable admin to call transfer admin of base contract * enable wrapConversionRate to control all adminOnly functions in conversionRate (#461) * Ilan/modify wrap conversion rate (#466) * enable wrapConversionRate to control all adminOnly functions in conversionRate * enable wrap conversion rate to control all admin functions in conversion rate contract * set admin as msg.sender. to follow base contract logic * remove redundant test. adopt to chainge in admin logic * add CR LF * rename folders. (#469) * rename folders. (remove contract from folder name.) * reset package - lock * move new mock contracts to mock folder. * create web3 object * Upgraded to ganache-cli@istanbul * Removed header * Istanbul fix (#457) * Return zero rate for same src and dest token (#475) * Return zero rate for same src & dest token * Removed unnecessary tests * Echo fork choice, fix broken logic * Try committing new package-lock.json * Added more info * Bumped to node v12.13.0 * Update package fix npm (#474) * Update package fix npm * Update package-lock file * Remove unused packages * Removed eslint * Add colour for better readability of fork choice * Add spacing between example commands * Resolve package-lock conflict * Revert "Bumped to node v12.13.0" This reverts commit 85cb734ed5bfae4fdc5fc0dc8c8dfcc8c3c426ed. * Fixed conflicting files * Revert "Merge branch 'clicky/ganacheIstanbul' into development" This reverts commit 654a1c3e7971319bd802df0cd70daf32337caa95, reversing changes made to 6c0a21c59eb55b44cfe8616a513e7e76533fc9c5. * Upgrade to ganache-cli@istanbul for testing with Istanbul fork (#482) * Added colour and newline to fork choice * Add node and npm version used * Removed eslint * Removed eslint * Got latest changes from Mike's PR * added colour and newline to fork choice * Fix coloring (I hope) * Changed BG to make text stand out * handle zero qty in get rate permission less reserve (#472) * handle zero qty in get rate permission less reserve * undo wrong change * Increase gas limit for 1 test due to Istanbul (#487) * [455] Enable unlist orderbook permissionless reserve (#485) * Add comments in FeeBurner for KNC decimals (#489) * Revert "Arbitrage check shifted to FeeBurner" (#488) * Revert "Arbitrage check shifted to FeeBurner (#433)" This reverts commit 80af391c738395ac57017f4e18eab904869cf6f7. * reverse un needed test changes for kyber NEtwork * Zero Src Qty Handling (#483) * Initial commit for zero rate handling. Need to rewrite tests * Improved comment to code * Modified getConversionRate function to require srcAmt > 0 * Removed tests, added one * Updated contracts as per feedback * Updated comment in test file * Added fix to expectedRateSmallQty * Remove extra = * Add additional section to check network.getExpectedRate doesn't revert as well * Removed redundant tests due to zero rate handling in network contract (#494) * update solidity coverage version (#491) * Added new deployment script and input files (#495) * Ilan/add rates getter (#493) * update solidity coverage version * add getter function for rates * update getter API and return values, add tests * Clicky/rename compile file (#496) * renamed compileOutput.js to compileContracts.js, added more contracts for reserveDeployer * Renamed compileOutput -> compileContracts * Minor spelling edit * update addresses for deployment (#497) * remove multi sig support. add admin functionality (#498) * remove multi sig support. add admin functionality * refactor wrapper contracts, update tests * update tests according to PR comments, add one missing check * Add some comments * Revert "[455] Enable unlist orderbook permissionless reserve (#485)" (#504) This reverts commit 8b63c0ea023b7965a7c00e452279cf52e03f32f2. * Fix deployment script after staging deployment (#505) * Added new deployment script and input files * Remove old file * Added contract instantiation if deployer script breaks halfway through * avoid query to uniswap with zero rate (#510) * avoid query to uniswap with zero rate * test situation where trade result is 0 * enable setting min record resultion in conversion rates using wrapper (#513) * enable setting min record resultion in conversion rates using wrapper * linting, and add missing test * fix uniswap bridge for small amounts src qty (1) (#518) * fix uniswap bridge for smal amounts src qty (1) * avoid reading fee twice * fix uniswap deployer script * Ilan/deployment helper (#516) * some deployment changes, and helper contract" " * add kyber uniswap bridge to compilation. remove wrap conversion rate * small fixes in deployer * Add CR LF * Ilan/merge master (#519) * update some packages. fix solc version to 0.4.18 (#503) * fixed FPR deployment script (#508) * add smartdec audit for APR * use correct package-lock * Add Eth2Dai reserve and test (#523) * [WIP] Eth2Dai Reserve enhancement (#449) * Add eth2dai contract * Update Eth2Dai reserve * Update Eth2DaiReserve contract and tests * Update trade function tests for eth2dai reserve * Make single test can run on its own * Separate source codes, add some v5 contracts * Update contracts fixed some review comments, remove some unused functions * Update eth2dai contract with enable/disable internal inventory for token * Add test for set internal inventory enable/disable * Put enable/disable internal inventory into internal inventory data * Add internal inventory tests * Change overlow to out of range * Update v5 contracts * Update file name and folder structure * Update folder structure * Fix can not find artifacts for WethTokenV5 * Update test folder structure * Remove KyberOasisReserve source code + test, change WethTokenV5 to WethToken (#524) * remove duplicate files and v5 example * update git ignore * update development (#547) * update git ignore (#544) * Kyber Bancor bridge reserve (#546) * Shifted arbitrage check to FeeBurner * Shifted relevant tests from expectedRate to feeBurner * Modified failing test, as it requires less gas to fail * Removed redundan >0 rate check, test for feeBurner * Added test for src==dest token * Istanbul fix, zero rate handling * Arbitrage check shifted to FeeBurner (#433) * Shifted arbitrage check to FeeBurner * Shifted relevant tests from expectedRate to feeBurner * Modified failing test, as it requires less gas to fail * Removed redundan >0 rate check, test for feeBurner * Added test for src==dest token * Revert "Merge branch 'clicky/zero_rate' into development" This reverts commit 795d2f1d28131534604586b7786cba4e79f21e04, reversing changes made to 80af391c738395ac57017f4e18eab904869cf6f7. * Clicky/buidl integration (#459) * Pulling stuff from KN/clicky/buidl-integration branch * Pull changes from expected rate and fee burner * Update kyberNetwork test file * Update kyberNetwork.js * Merge Mike's PR on enhanced step functions (#458) * [WIP] Add new conversion rate contract with step function enhancement (#416) * [WIP] Add new conversion rate contract with step function enhancement * Add more tests to kyberReserve for testing new conversion rate contract * Add more tests for kybetNetwork with new conversion rate contract * Add verify qty and imbalance step function amounts must be increasing * Add case set qty and balance step func with only one or zero element * Check for qty step function all amounts are non negative * Update conversion rate contract and kyber network tests * Fallback to old logics when qty is 0 * Update new conversion rate with inherite from old one, update logics for some edge cases and tests * Fixed typo * Add check for empty step function before executing step function * Fix issue when qty is negative and greater than all step qty * Fix issue with executing step func with 0 as qty (#417) * Remove unnecessary tests in conversionRate2, add more cases to test for new execute step function * Fix issue with execute step func for 0 qty * expose getImbalance function in conversionRate2.sol file (#419) * Update conversion rate contract 2 with new logics for executing step function * Resolve some comments, change name new conversion rates contract to EnhancedStepFunctions * Remove qty step function, compress data for imbalance steps * Resolve solhint max line length * Avoid modifying function params in execute step func * Update comments for each test case of getting correct bps for step func * Update with some comments, add more tests * Add await keyword * Update some comments, fix some old tests in kyber reserve * Fix wrong calculate imbalance of token in reserve test * Change default max imbalance to return when overflow, fix some tests with missing await keyword * Blocking setting qty step function in new conversion rate * Update execute step func with blocking rate, remove updatedRateBlock in getImbalance * Remove redundant stepX value in last step * Add check data when encoding step func, using MAX_VAL as default for last step X * Add checking for max value of step X and tests * Add check for max bps adjustment, check max_imbalance value test * Fixed Failing Tests (#462) * Istanbul fix * Fixed failing tests as per Ilan's feedback * Fixed failing tests * Minor fixes * Minor fixes * Sync enhanced step functions test file * Reduce getDecimals call in findBestRateTokenToToken in network contract (#467) * Reduce getDecimals call in findBestRateTokenToToken in network contract * Fix new line end file * Remove some tests in utils3 * Avoid decimals call when calling handleFees on FeeBurner (#468) * Ilan/merge master (#460) * reserve deployment scripts (#233) * reserve deployment scripts * read valid block duration from config file. (#423) * Weth Reserve Implementation (#304) * Weth Reserve Implementation Includes testing. Also includes an addition in helper to make throw catching more neat. * Add weth reserve test * Add deploy script for oasis reserve * Organize folder structure and update WrapConversionRate.sol #441 && #452 (#453) * Organize folder structure according to issue #441 this includes organizing audit folder and organizing reserves. Remove multisig support from WrapConversionRate.sol according to issue #452 * enable admin to call transfer admin of base contract * enable wrapConversionRate to control all adminOnly functions in conversionRate (#461) * Ilan/modify wrap conversion rate (#466) * enable wrapConversionRate to control all adminOnly functions in conversionRate * enable wrap conversion rate to control all admin functions in conversion rate contract * set admin as msg.sender. to follow base contract logic * remove redundant test. adopt to chainge in admin logic * add CR LF * rename folders. (#469) * rename folders. (remove contract from folder name.) * reset package - lock * move new mock contracts to mock folder. * create web3 object * Upgraded to ganache-cli@istanbul * Removed header * Istanbul fix (#457) * Return zero rate for same src and dest token (#475) * Return zero rate for same src & dest token * Removed unnecessary tests * Echo fork choice, fix broken logic * Try committing new package-lock.json * Added more info * Bumped to node v12.13.0 * Update package fix npm (#474) * Update package fix npm * Update package-lock file * Remove unused packages * Removed eslint * Add colour for better readability of fork choice * Add spacing between example commands * Resolve package-lock conflict * Revert "Bumped to node v12.13.0" This reverts commit 85cb734ed5bfae4fdc5fc0dc8c8dfcc8c3c426ed. * Fixed conflicting files * Revert "Merge branch 'clicky/ganacheIstanbul' into development" This reverts commit 654a1c3e7971319bd802df0cd70daf32337caa95, reversing changes made to 6c0a21c59eb55b44cfe8616a513e7e76533fc9c5. * Upgrade to ganache-cli@istanbul for testing with Istanbul fork (#482) * Added colour and newline to fork choice * Add node and npm version used * Removed eslint * Removed eslint * Got latest changes from Mike's PR * added colour and newline to fork choice * Fix coloring (I hope) * Changed BG to make text stand out * handle zero qty in get rate permission less reserve (#472) * handle zero qty in get rate permission less reserve * undo wrong change * Increase gas limit for 1 test due to Istanbul (#487) * [455] Enable unlist orderbook permissionless reserve (#485) * Add comments in FeeBurner for KNC decimals (#489) * Revert "Arbitrage check shifted to FeeBurner" (#488) * Revert "Arbitrage check shifted to FeeBurner (#433)" This reverts commit 80af391c738395ac57017f4e18eab904869cf6f7. * reverse un needed test changes for kyber NEtwork * Zero Src Qty Handling (#483) * Initial commit for zero rate handling. Need to rewrite tests * Improved comment to code * Modified getConversionRate function to require srcAmt > 0 * Removed tests, added one * Updated contracts as per feedback * Updated comment in test file * Added fix to expectedRateSmallQty * Remove extra = * Add additional section to check network.getExpectedRate doesn't revert as well * Removed redundant tests due to zero rate handling in network contract (#494) * update solidity coverage version (#491) * Added new deployment script and input files (#495) * Ilan/add rates getter (#493) * update solidity coverage version * add getter function for rates * update getter API and return values, add tests * Clicky/rename compile file (#496) * renamed compileOutput.js to compileContracts.js, added more contracts for reserveDeployer * Renamed compileOutput -> compileContracts * Minor spelling edit * update addresses for deployment (#497) * remove multi sig support. add admin functionality (#498) * remove multi sig support. add admin functionality * refactor wrapper contracts, update tests * update tests according to PR comments, add one missing check * Add some comments * Revert "[455] Enable unlist orderbook permissionless reserve (#485)" (#504) This reverts commit 8b63c0ea023b7965a7c00e452279cf52e03f32f2. * Fix deployment script after staging deployment (#505) * Added new deployment script and input files * Remove old file * Added contract instantiation if deployer script breaks halfway through * avoid query to uniswap with zero rate (#510) * avoid query to uniswap with zero rate * test situation where trade result is 0 * enable setting min record resultion in conversion rates using wrapper (#513) * enable setting min record resultion in conversion rates using wrapper * linting, and add missing test * fix uniswap bridge for small amounts src qty (1) (#518) * fix uniswap bridge for smal amounts src qty (1) * avoid reading fee twice * fix uniswap deployer script * Ilan/deployment helper (#516) * some deployment changes, and helper contract" " * add kyber uniswap bridge to compilation. remove wrap conversion rate * small fixes in deployer * Add CR LF * Ilan/merge master (#519) * update some packages. fix solc version to 0.4.18 (#503) * fixed FPR deployment script (#508) * add smartdec audit for APR * use correct package-lock * Ilan/master to development (#525) * Development to Master. Istanbul changes. buidl. (#471) * Shifted arbitrage check to FeeBurner * Shifted relevant tests from expectedRate to feeBurner * Modified failing test, as it requires less gas to fail * Removed redundan >0 rate check, test for feeBurner * Added test for src==dest token * Istanbul fix, zero rate handling * Arbitrage check shifted to FeeBurner (#433) * Shifted arbitrage check to FeeBurner * Shifted relevant tests from expectedRate to feeBurner * Modified failing test, as it requires less gas to fail * Removed redundan >0 rate check, test for feeBurner * Added test for src==dest token * Revert "Merge branch 'clicky/zero_rate' into development" This reverts commit 795d2f1d28131534604586b7786cba4e79f21e04, reversing changes made to 80af391c738395ac57017f4e18eab904869cf6f7. * Clicky/buidl integration (#459) * Pulling stuff from KN/clicky/buidl-integration branch * Pull changes from expected rate and fee burner * Update kyberNetwork test file * Update kyberNetwork.js * Merge Mike's PR on enhanced step functions (#458) * [WIP] Add new conversion rate contract with step function enhancement (#416) * [WIP] Add new conversion rate contract with step function enhancement * Add more tests to kyberReserve for testing new conversion rate contract * Add more tests for kybetNetwork with new conversion rate contract * Add verify qty and imbalance step function amounts must be increasing * Add case set qty and balance step func with only one or zero element * Check for qty step function all amounts are non negative * Update conversion rate contract and kyber network tests * Fallback to old logics when qty is 0 * Update new conversion rate with inherite from old one, update logics for some edge cases and tests * Fixed typo * Add check for empty step function before executing step function * Fix issue when qty is negative and greater than all step qty * Fix issue with executing step func with 0 as qty (#417) * Remove unnecessary tests in conversionRate2, add more cases to test for new execute step function * Fix issue with execute step func for 0 qty * expose getImbalance function in conversionRate2.sol file (#419) * Update conversion rate contract 2 with new logics for executing step function * Resolve some comments, change name new conversion rates contract to EnhancedStepFunctions * Remove qty step function, compress data for imbalance steps * Resolve solhint max line length * Avoid modifying function params in execute step func * Update comments for each test case of getting correct bps for step func * Update with some comments, add more tests * Add await keyword * Update some comments, fix some old tests in kyber reserve * Fix wrong calculate imbalance of token in reserve test * Change default max imbalance to return when overflow, fix some tests with missing await keyword * Blocking setting qty step function in new conversion rate * Update execute step func with blocking rate, remove updatedRateBlock in getImbalance * Remove redundant stepX value in last step * Add check data when encoding step func, using MAX_VAL as default for last step X * Add checking for max value of step X and tests * Add check for max bps adjustment, check max_imbalance value test * Fixed Failing Tests (#462) * Istanbul fix * Fixed failing tests as per Ilan's feedback * Fixed failing tests * Minor fixes * Minor fixes * Sync enhanced step functions test file * Reduce getDecimals call in findBestRateTokenToToken in network contract (#467) * Reduce getDecimals call in findBestRateTokenToToken in network contract * Fix new line end file * Remove some tests in utils3 * Avoid decimals call when calling handleFees on FeeBurner (#468) * Ilan/merge master (#460) * reserve deployment scripts (#233) * reserve deployment scripts * read valid block duration from config file. (#423) * Weth Reserve Implementation (#304) * Weth Reserve Implementation Includes testing. Also includes an addition in helper to make throw catching more neat. * Add weth reserve test * Add deploy script for oasis reserve * Organize folder structure and update WrapConversionRate.sol #441 && #452 (#453) * Organize folder structure according to issue #441 this includes organizing audit folder and organizing reserves. Remove multisig support from WrapConversionRate.sol according to issue #452 * enable admin to call transfer admin of base contract * enable wrapConversionRate to control all adminOnly functions in conversionRate (#461) * Ilan/modify wrap conversion rate (#466) * enable wrapConversionRate to control all adminOnly functions in conversionRate * enable wrap conversion rate to control all admin functions in conversion rate contract * set admin as msg.sender. to follow base contract logic * remove redundant test. adopt to chainge in admin logic * add CR LF * rename folders. (#469) * rename folders. (remove contract from folder name.) * reset package - lock * move new mock contracts to mock folder. * create web3 object * Upgraded to ganache-cli@istanbul * Removed header * Istanbul fix (#457) * Return zero rate for same src and dest token (#475) * Return zero rate for same src & dest token * Removed unnecessary tests * Echo fork choice, fix broken logic * Try committing new package-lock.json * Added more info * Bumped to node v12.13.0 * Update package fix npm (#474) * Update package fix npm * Update package-lock file * Remove unused packages * Removed eslint * Add colour for better readability of fork choice * Add spacing between example commands * Resolve package-lock conflict * Revert "Bumped to node v12.13.0" This reverts commit 85cb734ed5bfae4fdc5fc0dc8c8dfcc8c3c426ed. * Fixed conflicting files * Revert "Merge branch 'clicky/ganacheIstanbul' into development" This reverts commit 654a1c3e7971319bd802df0cd70daf32337caa95, reversing changes made to 6c0a21c59eb55b44cfe8616a513e7e76533fc9c5. * Upgrade to ganache-cli@istanbul for testing with Istanbul fork (#482) * Added colour and newline to fork choice * Add node and npm version used * Removed eslint * Removed eslint * Got latest changes from Mike's PR * added colour and newline to fork choice * Fix coloring (I hope) * Changed BG to make text stand out * handle zero qty in get rate permission less reserve (#472) * handle zero qty in get rate permission less reserve * undo wrong change * Increase gas limit for 1 test due to Istanbul (#487) * [455] Enable unlist orderbook permissionless reserve (#485) * Add comments in FeeBurner for KNC decimals (#489) * Revert "Arbitrage check shifted to FeeBurner" (#488) * Revert "Arbitrage check shifted to FeeBurner (#433)" This reverts commit 80af391c738395ac57017f4e18eab904869cf6f7. * reverse un needed test changes for kyber NEtwork * Zero Src Qty Handling (#483) * Initial commit for zero rate handling. Need to rewrite tests * Improved comment to code * Modified getConversionRate function to require srcAmt > 0 * Removed tests, added one * Updated contracts as per feedback * Updated comment in test file * Added fix to expectedRateSmallQty * Remove extra = * Add additional section to check network.getExpectedRate doesn't revert as well * Removed redundant tests due to zero rate handling in network contract (#494) * update solidity coverage version (#491) * Added new deployment script and input files (#495) * Ilan/add rates getter (#493) * update solidity coverage version * add getter function for rates * update getter API and return values, add tests * Clicky/rename compile file (#496) * renamed compileOutput.js to compileContracts.js, added more contracts for reserveDeployer * Renamed compileOutput -> compileContracts * Minor spelling edit * update addresses for deployment (#497) * remove multi sig support. add admin functionality (#498) * remove multi sig support. add admin functionality * refactor wrapper contracts, update tests * update tests according to PR comments, add one missing check * Add some comments * Revert "[455] Enable unlist orderbook permissionless reserve (#485)" (#504) This reverts commit 8b63c0ea023b7965a7c00e452279cf52e03f32f2. * Fix deployment script after staging deployment (#505) * Added new deployment script and input files * Remove old file * Added contract instantiation if deployer script breaks halfway through * avoid query to uniswap with zero rate (#510) * avoid query to uniswap with zero rate * test situation where trade result is 0 * enable setting min record resultion in conversion rates using wrapper (#513) * enable setting min record resultion in conversion rates using wrapper * linting, and add missing test * fix uniswap bridge for small amounts src qty (1) (#518) * fix uniswap bridge for smal amounts src qty (1) * avoid reading fee twice * fix uniswap deployer script * Ilan/deployment helper (#516) * some deployment changes, and helper contract" " * add kyber uniswap bridge to compilation. remove wrap conversion rate * small fixes in deployer * Add CR LF * Ilan/merge master (#519) * update some packages. fix solc version to 0.4.18 (#503) * fixed FPR deployment script (#508) * add smartdec audit for APR * use correct package-lock * Add Eth2Dai reserve and test (#523) * [WIP] Eth2Dai Reserve enhancement (#449) * Add eth2dai contract * Update Eth2Dai reserve * Update Eth2DaiReserve contract and tests * Update trade function tests for eth2dai reserve * Make single test can run on its own * Separate source codes, add some v5 contracts * Update contracts fixed some review comments, remove some unused functions * Update eth2dai contract with enable/disable internal inventory for token * Add test for set internal inventory enable/disable * Put enable/disable internal inventory into internal inventory data * Add internal inventory tests * Change overlow to out of range * Update v5 contracts * Update file name and folder structure * Update folder structure * Fix can not find artifacts for WethTokenV5 * Update test folder structure * Remove KyberOasisReserve source code + test, change WethTokenV5 to WethToken (#524) * remove duplicate files and v5 example * Add KyberBancorReserve and test * Fix some tests for kyber bancor reserve * Add more tests for kyber bancor reserve * Remove default value for bnt and bancor eth token * Add end of file line * Update contracts from review comments * Fix contract and test based on comments * Return 0 for rate and revert in trade when srcQty is 0 * Remove v5 example test file' Co-authored-by: Desmond <[email protected]> Co-authored-by: Ilan Doron <[email protected]> Co-authored-by: Le Xuan Manh <[email protected]> Co-authored-by: Desmond <[email protected]> * Upgrade web3 version to 1.2.4 (#514) * [WIP] Upgrade web3 version to 1.2.4 * Update conversion rate and enhance step func rate tests * Remove openzeplin test helper * Development to Master. Istanbul changes. buidl. (#471) * Shifted arbitrage check to FeeBurner * Shifted relevant tests from expectedRate to feeBurner * Modified failing test, as it requires less gas to fail * Removed redundan >0 rate check, test for feeBurner * Added test for src==dest token * Istanbul fix, zero rate handling * Arbitrage check shifted to FeeBurner (#433) * Shifted arbitrage check to FeeBurner * Shifted relevant tests from expectedRate to feeBurner * Modified failing test, as it requires less gas to fail * Removed redundan >0 rate check, test for feeBurner * Added test for src==dest token * Revert "Merge branch 'clicky/zero_rate' into development" This reverts commit 795d2f1d28131534604586b7786cba4e79f21e04, reversing changes made to 80af391c738395ac57017f4e18eab904869cf6f7. * Clicky/buidl integration (#459) * Pulling stuff from KN/clicky/buidl-integration branch * Pull changes from expected rate and fee burner * Update kyberNetwork test file * Update kyberNetwork.js * Merge Mike's PR on enhanced step functions (#458) * [WIP] Add new conversion rate contract with step function enhancement (#416) * [WIP] Add new conversion rate contract with step function enhancement * Add more tests to kyberReserve for testing new conversion rate contract * Add more tests for kybetNetwork with new conversion rate contract * Add verify qty and imbalance step function amounts must be increasing * Add case set qty and balance step func with only one or zero element * Check for qty step function all amounts are non negative * Update conversion rate contract and kyber network tests * Fallback to old logics when qty is 0 * Update new conversion rate with inherite from old one, update logics for some edge cases and tests * Fixed typo * Add check for empty step function before executing step function * Fix issue when qty is negative and greater than all step qty * Fix issue with executing step func with 0 as qty (#417) * Remove unnecessary tests in conversionRate2, add more cases to test for new execute step function * Fix issue with execute step func for 0 qty * expose getImbalance function in conversionRate2.sol file (#419) * Update conversion rate contract 2 with new logics for executing step function * Resolve some comments, change name new conversion rates contract to EnhancedStepFunctions * Remove qty step function, compress data for imbalance steps * Resolve solhint max line length * Avoid modifying function params in execute step func * Update comments for each test case of getting correct bps for step func * Update with some comments, add more tests * Add await keyword * Update some comments, fix some old tests in kyber reserve * Fix wrong calculate imbalance of token in reserve test * Change default max imbalance to return when overflow, fix some tests with missing await keyword * Blocking setting qty step function in new conversion rate * Update execute step func with blocking rate, remove updatedRateBlock in getImbalance * Remove redundant stepX value in last step * Add check data when encoding step func, using MAX_VAL as default for last step X * Add checking for max value of step X and tests * Add check for max bps adjustment, check max_imbalance value test * Fixed Failing Tests (#462) * Istanbul fix * Fixed failing tests as per Ilan's feedback * Fixed failing tests * Minor fixes * Minor fixes * Sync enhanced step functions test file * Reduce getDecimals call in findBestRateTokenToToken in network contract (#467) * Reduce getDecimals call in findBestRateTokenToToken in network contract * Fix new line end file * Remove some tests in utils3 * Avoid decimals call when calling handleFees on FeeBurner (#468) * Ilan/merge master (#460) * reserve deployment scripts (#233) * reserve deployment scripts * read valid block duration from config file. (#423) * Weth Reserve Implementation (#304) * Weth Reserve Implementation Includes testing. Also includes an addition in helper to make throw catching more neat. * Add weth reserve test * Add deploy script for oasis reserve * Organize folder structure and update WrapConversionRate.sol #441 && #452 (#453) * Organize folder structure according to issue #441 this includes organizing audit folder and organizing reserves. Remove multisig support from WrapConversionRate.sol according to issue #452 * enable admin to call transfer admin of base contract * enable wrapConversionRate to control all adminOnly functions in conversionRate (#461) * Ilan/modify wrap conversion rate (#466) * enable wrapConversionRate to control all adminOnly functions in conversionRate * enable wrap conversion rate to control all admin functions in conversion rate contract * set admin as msg.sender. to follow base contract logic * remove redundant test. adopt to chainge in admin logic * add CR LF * rename folders. (#469) * rename folders. (remove contract from folder name.) * reset package - lock * move new mock contracts to mock folder. * create web3 object * Upgraded to ganache-cli@istanbul * Removed header * Istanbul fix (#457) * Return zero rate for same src and dest token (#475) * Return zero rate for same src & dest token * Removed unnecessary tests * Echo fork choice, fix broken logic * Try committing new package-lock.json * Added more info * Bumped to node v12.13.0 * Update package fix npm (#474) * Update package fix npm * Update package-lock file * Remove unused packages * Removed eslint * Add colour for better readability of fork choice * Add spacing between example commands * Resolve package-lock conflict * Revert "Bumped to node v12.13.0" This reverts commit 85cb734ed5bfae4fdc5fc0dc8c8dfcc8c3c426ed. * Fixed conflicting files * Revert "Merge branch 'clicky/ganacheIstanbul' into development" This reverts commit 654a1c3e7971319bd802df0cd70daf32337caa95, reversing changes made to 6c0a21c59eb55b44cfe8616a513e7e76533fc9c5. * Upgrade to ganache-cli@istanbul for testing with Istanbul fork (#482) * Added colour and newline to fork choice * Add node and npm version used * Removed eslint * Removed eslint * Got latest changes from Mike's PR * added colour and newline to fork choice * Fix coloring (I hope) * Changed BG to make text stand out * handle zero qty in get rate permission less reserve (#472) * handle zero qty in get rate permission less reserve * undo wrong change * Increase gas limit for 1 test due to Istanbul (#487) * [455] Enable unlist orderbook permissionless reserve (#485) * Add comments in FeeBurner for KNC decimals (#489) * Revert "Arbitrage check shifted to FeeBurner" (#488) * Revert "Arbitrage check shifted to FeeBurner (#433)" This reverts commit 80af391c738395ac57017f4e18eab904869cf6f7. * reverse un needed test changes for kyber NEtwork * Zero Src Qty Handling (#483) * Initial commit for zero rate handling. Need to rewrite tests * Improved comment to code * Modified getConversionRate function to require srcAmt > 0 * Removed tests, added one * Updated contracts as per feedback * Updated comment in test file * Added fix to expectedRateSmallQty * Remove extra = * Add additional section to check network.getExpectedRate doesn't revert as well * Removed redundant tests due to zero rate handling in network contract (#494) * update solidity coverage version (#491) * Added new deployment script and input files (#495) * Ilan/add rates getter (#493) * update solidity coverage version * add getter function for rates * update getter API and return values, add tests * Clicky/rename compile file (#496) * renamed compileOutput.js to compileContracts.js, added more contracts for reserveDeployer * Renamed compileOutput -> compileContracts * Minor spelling edit * update addresses for deployment (#497) * remove multi sig support. add admin functionality (#498) * remove multi sig support. add admin functionality * refactor wrapper contracts, update tests * update tests according to PR comments, add one missing check * Add some comments * Revert "[455] Enable unlist orderbook permissionless reserve (#485)" (#504) This reverts commit 8b63c0ea023b7965a7c00e452279cf52e03f32f2. * Fix deployment script after staging deployment (#505) * Added new deployment script and input files * Remove old file * Added contract instantiation if deployer script breaks halfway through * avoid query to uniswap with zero rate (#510) * avoid query to uniswap with zero rate * test situation where trade result is 0 * enable setting min record resultion in conversion rates using wrapper (#513) * enable setting min record resultion in conversion rates using wrapper * linting, and add missing test * fix uniswap bridge for small amounts src qty (1) (#518) * fix uniswap bridge for smal amounts src qty (1) * avoid reading fee twice * fix uniswap deployer script * Ilan/deployment helper (#516) * some deployment changes, and helper contract" " * add kyber uniswap bridge to compilation. remove wrap conversion rate * small fixes in deployer * Add CR LF * Ilan/merge master (#519) * update some packages. fix solc version to 0.4.18 (#503) * fixed FPR deployment script (#508) * add smartdec audit for APR * use correct package-lock * Add Eth2Dai reserve and test (#523) * [WIP] Eth2Dai Reserve enhancement (#449) * Add eth2dai contract * Update Eth2Dai reserve * Update Eth2DaiReserve contract and tests * Update trade function tests for eth2dai reserve * Make single test can run on its own * Separate source codes, add some v5 contracts * Update contracts fixed some review comments, remove some unused functions * Update eth2dai contract with enable/disable internal inventory for token * Add test for set internal inventory enable/disable * Put enable/disable internal inventory into internal inventory data * Add internal inventory tests * Change overlow to out of range * Update v5 contracts * Update file name and folder structure * Update folder structure * Fix can not find artifacts for WethTokenV5 * Update test folder structure * Rebase from development * Modify kyberNetwork script to be web3 1.x compatible * Clicky's web3 compatibility upgrade (#531) * KNP.js web3 1.x compatible * DutchXReserve.js * Removed addBps function, since we using Helper one * remove web3 instantiation * kyberUniswapReserve.js * Update test for expected rate and fee burner (#532) * Update test for expected rate and fee burner * Remove unused codes * support new web3 lib, especailly new BN (#533) * support new web3 lib, especailly new BN * upgrade kyber weth reserve to web3 * remove unused log function * kyberReserve.js, permissionGroups.js, whitelist.js, volumeImbalanceRecorder.js (#535) * KNP.js web3 1.x compatible * DutchXReserve.js * Removed addBps function, since we using Helper one * remove web3 instantiation * kyberUniswapReserve.js * kyberReserve.js * permissionGroups.js * Small code refactor for volumeImbalanceRecorder * whitelist.js * Remove valueOf() * Move calc src & dst qty functions to helper * wrapper files(3), orderIdManager, orderList, mockDepositxx, mockExchnagexxx, permission less order book reserve lister (#537) * update for web3 version * update wrappers to work with new web3 version * correct use artifacts * order list upgrade web3 * remove some debug info * upgrade permission less oreder book reserve lister to test to new Web3 version * fix some typos * remove some more valueOf() in assert (#538) * remove some valueOf() that are not required. * add CR LF on end * add back correct package lock * add back correct package lock * Update test for helper, liquidity conversion rates and formula (#536) * Update test for helper, liquidity conversion rates and formula * Remove unused logs * Update codes based on comments * Add new line for helper * remove valueOf(), user helper file to assert (#540) * remove valueOf() calls assert.equal --> Helper.assertEqual() * remove valueOf(), use Helper to assert * remove valueOf() * [WIP] Web3 upgrade for eth2 dai (#542) * eth2Dai initial commit * add helper changes * add issues * Fix failing tests, using helper assert func (#543) Co-authored-by: Le Xuan Manh <[email protected]> * remove example test file (#545) * Utils.js, Utils2.js, Utils3.js, update to web3 v1.2.4 (#534) * Updated utils.js to web3 1.2.4 * Updated utils2.js to web3 1.2.4 * Updated utils3.js to web3 1.2.4 * Updated utils*.js, fixed bugs on helper.js * Added modifications from Ilan's feedback * orderbookReserve.js update to web3 v1.2.4 (#555) * orderbookReserve.js update to web3 v1.2.4 * Implemented changes from feedback * Updated TokenWei var to Token18Dec * Changed Token18Dec var to camel case * Web3 upgrade bancor (#577) * update git ignore * update development (#547) * update git ignore (#544) * Kyber Bancor bridge reserve (#546) * Shifted arbitrage check to FeeBurner * Shifted relevant tests from expectedRate to feeBurner * Modified failing test, as it requires less gas to fail * Removed redundan >0 rate check, test for feeBurner * Added test for src==dest token * Istanbul fix, zero rate handling * Arbitrage check shifted to FeeBurner (#433) * Shifted arbitrage check to FeeBurner * Shifted relevant tests from expectedRate to feeBurner * Modified failing test, as it requires less gas to fail * Removed redundan >0 rate check, test for feeBurner * Added test for src==dest token * Revert "Merge branch 'clicky/zero_rate' into development" This reverts commit 795d2f1d28131534604586b7786cba4e79f21e04, reversing changes made to 80af391c738395ac57017f4e18eab904869cf6f7. * Clicky/buidl integration (#459) * Pulling stuff from KN/clicky/buidl-integration branch * Pull changes from expected rate and fee burner * Update kyberNetwork test file * Update kyberNetwork.js * Merge Mike's PR on enhanced step functions (#458) * [WIP] Add new conversion rate contract with step function enhancement (#416) * [WIP] Add new conversion rate contract with step function enhancement * Add more tests to kyberReserve for testing new conversion rate contract * Add more tests for kybetNetwork with new conversion rate contract * Add verify qty and imbalance step function amounts must be increasing * Add case set qty and balance step func with only one or zero element * Check for qty step function all amounts are non negative * Update conversion rate contract and kyber network tests * Fallback to old logics when qty is 0 * Update new conversion rate with inherite from old one, update logics for some edge cases and tests * Fixed typo * Add check for empty step function before executing step function * Fix issue when qty is negative and greater than all step qty * Fix issue with executing step func with 0 as qty (#417) * Remove unnecessary tests in conversionRate2, add more cases to test for new execute step function * Fix issue with execute step func for 0 qty * expose getImbalance function in conversionRate2.sol file (#419) * Update conversion rate contract 2 with new logics for executing step function * Resolve some comments, change name new conversion rates contract to EnhancedStepFunctions * Remove qty step function, compress data for imbalance steps * Resolve solhint max line length * Avoid modifying function params in execute step func * Update comments for each test case of getting correct bps for step func * Update with some comments, add more tests * Add await keyword * Update some comments, fix some old tests in kyber reserve * Fix wrong calculate imbalance of token in reserve test * Change default max imbalance to return when overflow, fix some tests with missing await keyword * Blocking setting qty step function in new conversion rate * Update execute step func with blocking rate, remove updatedRateBlock in getImbalance * Remove redundant stepX value in last step * Add check data when encoding step func, using MAX_VAL as default for last step X * Add checking for max value of step X and tests * Add check for max bps adjustment, check max_imbalance value test * Fixed Failing Tests (#462) * Istanbul fix * Fixed failing tests as per Ilan's feedback * Fixed failing tests * Minor fixes * Minor fixes * Sync enhanced step functions test file * Reduce getDecimals call in findBestRateTokenToToken in network contract (#467) * Reduce getDecimals call in findBestRateTokenToToken in network contract * Fix new line end file * Remove some tests in utils3 * Avoid decimals call when calling handleFees on FeeBurner (#468) * Ilan/merge master (#460) * reserve deployment scripts (#233) * reserve deployment scripts * read valid block duration from config file. (#423) * Weth Reserve Implementation (#304) * Weth Reserve Implementation Includes testing. Also includes an addition in helper to make throw catching more neat. * Add weth reserve test * Add deploy script for oasis reserve * Organize folder structure and update WrapConversionRate.sol #441 && #452 (#453) * Organize folder structure according to issue #441 this includes organizing audit folder and organizing reserves. Remove multisig support from WrapConversionRate.sol according to issue #452 * enable admin to call transfer admin of base contract * enable wrapConversionRate to control all adminOnly functions in conversionRate (#461) * Ilan/modify wrap conversion rate (#466) * enable wrapConversionRate to control all adminOnly functions in conversionRate * enable wrap conversion rate to control all admin functions in conversion rate contract * set admin as msg.sender. to follow base contract logic * remove redundant test. adopt to chainge in admin logic * add CR LF * rename folders. (#469) * rename folders. (remove contract from folder name.) * reset package - lock * move new mock contracts to mock folder. * create web3 object * Upgraded to ganache-cli@istanbul * Removed header * Istanbul fix (#457) * Return zero rate for same src and dest token (#475) * Return zero rate for same src & dest token * Removed unnecessary tests * Echo fork choice, fix broken logic * Try committing new package-lock.json * Added more info * Bumped to node v12.13.0 * Update package fix npm (#474) * Update package fix npm * Update package-lock file * Remove unused packages * Removed eslint * Add colour for better readability of fork choice * Add spacing between example commands * Resolve package-lock conflict * Revert "Bumped to node v12.13.0" This reverts commit 85cb734ed5bfae4fdc5fc0dc8c8dfcc8c3c426ed. * Fixed conflicting files * Revert "Merge branch 'clicky/ganacheIstanbul' into development" This reverts commit 654a1c3e7971319bd802df0cd70daf32337caa95, reversing changes made to 6c0a21c59eb55b44cfe8616a513e7e76533fc9c5. * Upgrade to ganache-cli@istanbul for testing with Istanbul fork (#482) * Added colour and newline to fork choice * Add node and npm version used * Removed eslint * Removed eslint * Got latest changes from Mike's PR * added colour and newline to fork choice * Fix coloring (I hope) * Changed BG to make text stand out * handle zero qty in get rate permission less reserve (#472) * handle zero qty in get rate permission less reserve * undo wrong change * Increase gas limit for 1 test due to Istanbul (#487) * [455] Enable unlist orderbook permissionless reserve (#485) * Add comments in FeeBurner for KNC decimals (#489) * Revert "Arbitrage check shifted to FeeBurner" (#488) * Revert "Arbitrage check shifted to FeeBurner (#433)" This reverts commit 80af391c738395ac57017f4e18eab904869cf6f7. * reverse un needed test changes for kyber NEtwork * Zero Src Qty Handling (#483) * Initial commit for zero rate handling. Need to rewrite tests * Improved comment to code * Modified getConversionRate function to require srcAmt > 0 * Removed tests, added one * Updated contracts as per feedback * Updated comment in test file * Added fix to expectedRateSmallQty * Remove extra = * Add additional section to check network.getExpectedRate doesn't revert as well * Removed redundant tests due to zero rate handling in network contract (#494) * update solidity coverage version (#491) * Added new deployment script and input files (#495) * Ilan/add rates getter (#493) * update solidity coverage version * add getter function for rates * update getter API and return values, add tests * Clicky/rename compile file (#496) * renamed compileOutput.js to compileContracts.js, added more contracts for reserveDeployer * Renamed compileOutput -> compileContracts * Minor spelling edit * update addresses for deployment (#497) * remove multi sig support. add admin functionality (#498) * remove multi sig support. add admin functionality * refactor wrapper contracts, update tests * update tests according to PR comments, add one missing check * Add some comments * Revert "[455] Enable unlist orderbook permissionless reserve (#485)" (#504) This reverts commit 8b63c0ea023b7965a7c00e452279cf52e03f32f2. * Fix deployment script after staging deployment (#505) * Added new deployment script and input files * Remove old file * Added contract instantiation if deployer script breaks halfway through * avoid query to uniswap with zero rate (#510) * avoid query to uniswap with zero rate * test situation where trade result is 0 * enable setting min record resultion in conversion rates using wrapper (#513) * enable setting min record resultion in conversion rates using wrapper * linting, and add missing test * fix uniswap bridge for small amounts src qty (1) (#518) * fix uniswap bridge for smal amounts src qty (1) * avoid reading fee twice * fix uniswap deployer script * Ilan/deployment helper (#516) * some deployment changes, and helper contract" " * add kyber uniswap bridge to compilation. remove wrap conversion rate * small fixes in deployer * Add CR LF * Ilan/merge master (#519) * update some packages. fix solc version to 0.4.18 (#503) * fixed FPR deployment script (#508) * add smartdec audit for APR * use correct package-lock * Ilan/master to development (#525) * Development to Master. Istanbul changes. buidl. (#471) * Shifted arbitrage check to FeeBurner * Shifted relevant tests from expectedRate to feeBurner * Modified failing test, as it requires less gas to fail * Removed redundan >0 rate check, test for feeBurner * Added test for src==dest token * Istanbul fix, zero rate handling * Arbitrage check shifted to FeeBurner (#433) * Shifted arbitrage check to FeeBurner * Shifted relevant tests from expectedRate to feeBurner * Modified failing test, as it requires less gas to fail * Removed redundan >0 rate check, test for feeBurner * Added test for src==dest token * Revert "Merge branch 'clicky/zero_rate' into development" This reverts commit 795d2f1d28131534604586b7786cba4e79f21e04, reversing changes made to 80af391c738395ac57017f4e18eab904869cf6f7. * Clicky/buidl integration (#459) * Pulling stuff from KN/clicky/buidl-integration branch * Pull changes from expected rate and fee burner * Update…
1 parent a4f1471 commit e44bbb2

39 files changed

+7666
-8450
lines changed

buidler.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
usePlugin("@nomiclabs/buidler-truffle4");
2-
usePlugin("@nomiclabs/buidler-web3-legacy");
1+
usePlugin("@nomiclabs/buidler-truffle5");
2+
usePlugin("@nomiclabs/buidler-web3");
33

44
module.exports = {
55
defaultNetwork: "develop",

contracts/reserves/fprConversionRate/ConversionRateEnhancedSteps.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ pragma solidity 0.4.18;
22

33
import "./ConversionRates.sol";
44

5-
/// @title EnhancedStepFunctions contract - new ConversionRates contract with step function enhancement
5+
/// @title ConversionRateEnhancedSteps contract - new ConversionRates contract with step function enhancement
66
/// Removed qty step function overhead
77
/// Also fixed following issues:
88
/// https://github.com/KyberNetwork/smart-contracts/issues/291
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
pragma solidity 0.5.11;
3+
4+
import "../../../mock/Token.sol";
5+
6+
contract WethTokenV5 is Token {
7+
8+
constructor(string memory _name, string memory _symbol, uint _decimals) Token(_name, _symbol, _decimals) public {}
9+
10+
event Deposit(address indexed dst, uint wad);
11+
12+
function deposit() public payable {
13+
balances[msg.sender] += msg.value;
14+
emit Deposit(msg.sender, msg.value);
15+
}
16+
17+
event Withdrawal(address indexed src, uint wad);
18+
19+
function withdraw(uint wad) public {
20+
require(balances[msg.sender] >= wad);
21+
balances[msg.sender] -= wad;
22+
msg.sender.transfer(wad);
23+
emit Withdrawal(msg.sender, wad);
24+
}
25+
}

0 commit comments

Comments
 (0)