|
|
@ -21,7 +21,11 @@ contract rateLimitedMultisigIsm { |
|
|
|
ThresholdValidatorsSet[] memory _rules |
|
|
|
ThresholdValidatorsSet[] memory _rules |
|
|
|
) { |
|
|
|
) { |
|
|
|
for (uint256 rule = 0; rule < _rules.length; rule++) { |
|
|
|
for (uint256 rule = 0; rule < _rules.length; rule++) { |
|
|
|
if (rule > 0) {require(_rules[rule].startAmount > _rules[rule-1].startAmount);} |
|
|
|
if (rule > 0) { |
|
|
|
|
|
|
|
require( |
|
|
|
|
|
|
|
_rules[rule].startAmount > _rules[rule - 1].startAmount |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
rules.push(_rules[rule]); |
|
|
|
rules.push(_rules[rule]); |
|
|
|
} |
|
|
|
} |
|
|
|
defaultSet = _default; |
|
|
|
defaultSet = _default; |
|
|
@ -33,9 +37,16 @@ contract rateLimitedMultisigIsm { |
|
|
|
uint256 tokenAmount = _message.amount(); |
|
|
|
uint256 tokenAmount = _message.amount(); |
|
|
|
|
|
|
|
|
|
|
|
// mind that for the sake of example sets aren't united and you should repeat addresses when setting up if they to appear on different thresholds |
|
|
|
// mind that for the sake of example sets aren't united and you should repeat addresses when setting up if they to appear on different thresholds |
|
|
|
for (uint256 thresholdInd = rules.length-1; thresholdInd == 0; thresholdInd--) { |
|
|
|
for ( |
|
|
|
|
|
|
|
uint256 thresholdInd = rules.length - 1; |
|
|
|
|
|
|
|
thresholdInd == 0; |
|
|
|
|
|
|
|
thresholdInd-- |
|
|
|
|
|
|
|
) { |
|
|
|
if (tokenAmount >= rules[thresholdInd].startAmount) { |
|
|
|
if (tokenAmount >= rules[thresholdInd].startAmount) { |
|
|
|
return (rules[thresholdInd].validatorsSet, rules[thresholdInd].validatorsSet.length); |
|
|
|
return ( |
|
|
|
|
|
|
|
rules[thresholdInd].validatorsSet, |
|
|
|
|
|
|
|
rules[thresholdInd].validatorsSet.length |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|