mirror of
https://github.com/Instadapp/yield-contract.git
synced 2024-07-29 21:47:29 +00:00
Added sanity checks in settle() token pools
This commit is contained in:
parent
df780b55a0
commit
d3b423ba62
|
@ -105,6 +105,7 @@ contract PoolToken is ReentrancyGuard, ERC20Pausable, DSMath {
|
|||
* @param _data array of connector's function calldata
|
||||
*/
|
||||
function settle(address[] calldata _targets, bytes[] calldata _data) external isChief {
|
||||
require(_targets.length != 0, "targets-length-zero");
|
||||
require(_targets.length == _data.length , "array-length-invalid");
|
||||
require(registry.checkSettleLogics(address(this), _targets), "not-logic");
|
||||
for (uint i = 0; i < _targets.length; i++) {
|
||||
|
|
|
@ -102,6 +102,7 @@ contract PoolETH is ReentrancyGuard, ERC20Pausable, DSMath {
|
|||
* @param _data array of connector's function calldata
|
||||
*/
|
||||
function settle(address[] calldata _targets, bytes[] calldata _data) external isChief {
|
||||
require(_targets.length != 0, "targets-length-zero");
|
||||
require(_targets.length == _data.length , "array-length-invalid");
|
||||
require(registry.checkSettleLogics(address(this), _targets), "not-logic");
|
||||
for (uint i = 0; i < _targets.length; i++) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user