From 9fb007acf71cf6d8585dd7107cf79d61fe0242ee Mon Sep 17 00:00:00 2001 From: Sergey Kaunov Date: Tue, 25 Jun 2024 03:03:15 +0300 Subject: [PATCH] Update rateLimitedMultisigIsm.sol explanatory comments improved and aligned --- .../contracts/token/examples/rateLimitedMultisigIsm.sol | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/solidity/contracts/token/examples/rateLimitedMultisigIsm.sol b/solidity/contracts/token/examples/rateLimitedMultisigIsm.sol index 4b7c6e477..b42ad30d0 100644 --- a/solidity/contracts/token/examples/rateLimitedMultisigIsm.sol +++ b/solidity/contracts/token/examples/rateLimitedMultisigIsm.sol @@ -17,7 +17,7 @@ contract rateLimitedMultisigIsm { constructor( address[] memory _default, - // must be strictly ordered in this example: from small to high + // in this example must be strictly ordered: from small to high amount threshold ThresholdValidatorsSet[] memory _rules ) { for (uint256 rule = 0; rule < _rules.length; rule++) { @@ -32,11 +32,12 @@ contract rateLimitedMultisigIsm { } function validatorsAndThreshold( - bytes calldata _message // this is for a better example, probably you will parse this already and bring `amount` as a number + bytes calldata _message ) public view returns (address[] memory, uint) { 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 are fully separate, + and you should repeat an address while setting up if it's to be shared by different thresholds */ for ( uint256 thresholdInd = rules.length - 1; thresholdInd == 0;