chore: rename amountOwed -> amountIn
...for consistency. Also remove comment. We will keep exact_out to avoid future interface changes.
This commit is contained in:
@@ -369,7 +369,7 @@ contract TychoRouter is
|
|||||||
int256 amount0Delta,
|
int256 amount0Delta,
|
||||||
int256 amount1Delta,
|
int256 amount1Delta,
|
||||||
bytes calldata data
|
bytes calldata data
|
||||||
) internal view returns (uint256 amountOwed, address tokenIn) {
|
) internal view returns (uint256 amountIn, address tokenIn) {
|
||||||
tokenIn = address(bytes20(data[0:20]));
|
tokenIn = address(bytes20(data[0:20]));
|
||||||
address tokenOut = address(bytes20(data[20:40]));
|
address tokenOut = address(bytes20(data[20:40]));
|
||||||
uint24 poolFee = uint24(bytes3(data[40:43]));
|
uint24 poolFee = uint24(bytes3(data[40:43]));
|
||||||
@@ -379,9 +379,9 @@ contract TychoRouter is
|
|||||||
_usv3Factory, tokenIn, tokenOut, poolFee
|
_usv3Factory, tokenIn, tokenOut, poolFee
|
||||||
);
|
);
|
||||||
|
|
||||||
amountOwed =
|
amountIn =
|
||||||
amount0Delta > 0 ? uint256(amount0Delta) : uint256(amount1Delta);
|
amount0Delta > 0 ? uint256(amount0Delta) : uint256(amount1Delta);
|
||||||
|
|
||||||
return (amountOwed, tokenIn);
|
return (amountIn, tokenIn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,6 @@ pub struct Transaction {
|
|||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub struct EncodingContext {
|
pub struct EncodingContext {
|
||||||
pub receiver: Bytes,
|
pub receiver: Bytes,
|
||||||
// TODO should we keep this?
|
|
||||||
pub exact_out: bool,
|
pub exact_out: bool,
|
||||||
pub router_address: Bytes,
|
pub router_address: Bytes,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user