execute.chain A => {
buy 10 token
}
execute.chain ( 0x0a0808 or 0x0a8888 ) => {
sell 5 token : works alone [does not work if chained with the second sell]
sell 6 token
}
desired result execute.chain B : success, fail but overall the transaction does not fail
current result execute.chain B : fail, fail, complete transaction fails
I tried changing 0x0a0808 or 0x0a8888, in hopes it will trigger true in the contract but the whole transaction fails.
function successRequired(bytes1 command) internal pure returns (bool) {
return command & Commands.FLAG_ALLOW_REVERT == 0;
}
Is this the expected result or am I just misunderstanding the Technical Reference when it comes to the 0x80 flag in conjunction with commands ?
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.
re-deployed universal router locally, completely removing the revert part in universal-router.sol, still same results. If 1 part fails, everything fails. Has anyone ever used the F Flag feature successfully ?
desired result execute.chain B : success, fail but overall the transaction does not fail current result execute.chain B : fail, fail, complete transaction fails
I tried changing 0x0a0808 or 0x0a8888, in hopes it will trigger
true
in the contract but the whole transaction fails.Is this the expected result or am I just misunderstanding the Technical Reference when it comes to the 0x80 flag in conjunction with commands ?
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.