gnosisguild / zodiac-modifier-roles-v1

Zodiac Roles Modifier V1 (legacy)
https://roles-v1.gnosisguild.org
GNU Lesser General Public License v3.0
1 stars 3 forks source link

uint256 param can not be rule with "less than" or "greater than" when initializing a role with target from safe web2 #3

Closed TangCYxy closed 11 months ago

TangCYxy commented 1 year ago

Describe the bug I want to rule a safe contract A with a roled address B, and B can only call transfer method with less than 10 usdt from the balances of A without the permission from A's owners. After the contract of Role Modifier is created. I'm to add target and member. Then I met the bug.

Uint256 param can not be rule with less than or greater than when initializing a role with target contract address and there's only 2 options can be selected, that is "equals to" and "is one of". The only way works i found is to set the uint256 param's rule with "equal to" in the first transaction, and then re-enter the setting of role modifier, then the other 2 options "greater than" and "less than".

To Reproduce Steps to reproduce the behavior: 1 Enter the zodiac web2 pages from Safe Web2 (app.safe.global) 2 Select Role Modifier and Execute the safe transaction using the 2 default contract address; 3 Click "edit roles" from the left panel "Modules and Modifiers" 4 Click "create a role" button 5 Click "Add a Target" from the left panel 6 Enter the contract address of USDT "0xc2132d05d31c914a87c6611c10748aeb04b58e8f" and Click "Add target" 7 Un-Select the checkbox "Allow all calls to target" from the right panel 8 Find the method "transfer" and click the "down arrow" 9 Click the button "add a condition" besides the second param "amount (uint256)" 10 Then we can see there's no choice that called "less than" or "greater than"

Expected behavior All the 4 options are required to be listed when initializing a role with target contract.

Screenshots / logs

Relevant environment details:

Additional context