Skip to content

Commit

Permalink
fix: missed memory to calldata (Uniswap#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
hensha256 authored Mar 1, 2023
1 parent e8b5e90 commit 5fe2f6a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion contracts/base/Dispatcher.sol
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ abstract contract Dispatcher is Payments, V2SwapRouter, V3SwapRouter, Callbacks,
} else {
if (command == Commands.EXECUTE_SUB_PLAN) {
bytes calldata _commands = inputs.toBytes(0);
bytes[] memory _inputs = inputs.toBytesArray(1);
bytes[] calldata _inputs = inputs.toBytesArray(1);
(success, output) =
(address(this)).call(abi.encodeWithSelector(Dispatcher.execute.selector, _commands, _inputs));
} else if (command == Commands.SEAPORT_V2) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@
exports[`Uniswap Gas Tests Mixing V2 and V3 with Universal Router. Batch reverts gas: 2 sub-plans, both fail but the transaction succeeds 1`] = `
Object {
"calldataByteLength": 1764,
"gasUsed": 275850,
"gasUsed": 271867,
}
`;

exports[`Uniswap Gas Tests Mixing V2 and V3 with Universal Router. Batch reverts gas: 2 sub-plans, neither fails 1`] = `
Object {
"calldataByteLength": 1764,
"gasUsed": 251579,
"gasUsed": 247597,
}
`;

exports[`Uniswap Gas Tests Mixing V2 and V3 with Universal Router. Batch reverts gas: 2 sub-plans, second sub plan fails 1`] = `
Object {
"calldataByteLength": 1764,
"gasUsed": 251579,
"gasUsed": 247597,
}
`;

exports[`Uniswap Gas Tests Mixing V2 and V3 with Universal Router. Batch reverts gas: 2 sub-plans, the first fails 1`] = `
Object {
"calldataByteLength": 1764,
"gasUsed": 275850,
"gasUsed": 271867,
}
`;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`UniversalRouter Gas Tests gas: bytecode size 1`] = `18117`;
exports[`UniversalRouter Gas Tests gas: bytecode size 1`] = `18109`;

exports[`UniversalRouter Gas Tests trading for NFTs gas: ERC20 --> ETH --> Seaport NFT 1`] = `
Object {
Expand Down

0 comments on commit 5fe2f6a

Please sign in to comment.