Replies: 4 comments 3 replies
-
Hello @bscNinja ! This lib does not support partial reverts (yet?), but maybe I could implement it if there is enough interest in it.
I have not really played with this flag, but this looks good to me. Hard to tell more without details on the whole transaction. |
Beta Was this translation helpful? Give feedback.
-
Hey Elnaril, thanks for getting back to me. Starting to think that either the function in the contract does not work or I`m missing something here. As I understand the Technical Reference 0x80 is a mask, also opened an Isuee on Uniswap Github to get clarification. Let me know if I can support you in any Way since this functionality is crucial for the success of a Project that I`m working on |
Beta Was this translation helpful? Give feedback.
-
Hey @bscNinja ! |
Beta Was this translation helpful? Give feedback.
-
I tried changing i.e. 0x08 => 0x88 which executes the comands in the chain fine, but the desired effect of partial revert does not work.
Comands.sol
bytes1 internal constant FLAG_ALLOW_REVERT = 0x80;
Uniswap Technical Reference
F
A single bit flag, that signals whether or not the command should be allowed to revert without the whole transaction failing.
If f is 0 aka false and the command reverts, then the entire transaction will revert and none of the commands will be executed.
If f is 1 aka true and the command reverts, then the transaction will continue, allowing us to achieve partial fills. If using this flag, be careful to include further commands that will remove any funds that could be left unused in the UniversalRouter contract.
Beta Was this translation helpful? Give feedback.
All reactions