small tweaks
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
# Uniswap v2 Smart Contracts
|
||||
[](https://circleci.com/gh/Uniswap/uniswap-v2)
|
||||
[](https://circleci.com/gh/Uniswap/uniswap-v2-core)
|
||||
|
||||
## Local Development
|
||||
|
||||
|
||||
@ -161,7 +161,7 @@ contract UniswapV2 is IUniswapV2, ERC20("Uniswap V2", "UNI-V2", 18, 0), SafeTran
|
||||
emit Swap(msg.sender, recipient, amount0, amount1, reserve0, reserve1, token1);
|
||||
}
|
||||
|
||||
// almost certainly never needs to be called, it's for weird tokens
|
||||
// almost never _needs_ to be called, it's for weird tokens and can also be helpful for oracles
|
||||
function sync() external lock {
|
||||
update(IERC20(token0).balanceOf(address(this)), IERC20(token1).balanceOf(address(this)));
|
||||
}
|
||||
|
||||
@ -47,4 +47,5 @@ interface IUniswapV2 {
|
||||
function burnLiquidity(address recipient) external returns (uint amount0, uint amount1);
|
||||
function swap0(address recipient) external returns (uint amount1);
|
||||
function swap1(address recipient) external returns (uint amount0);
|
||||
function sync() external;
|
||||
}
|
||||
|
||||
@ -19,9 +19,9 @@ describe('UniswapV2', () => {
|
||||
let token1: Contract
|
||||
let exchange: Contract
|
||||
beforeEach(async () => {
|
||||
const { token0: _token0, token1: _token1, exchange: _exchange } = (await loadFixture(
|
||||
const { token0: _token0, token1: _token1, exchange: _exchange }: ExchangeFixture = await loadFixture(
|
||||
exchangeFixture as any
|
||||
)) as ExchangeFixture
|
||||
)
|
||||
token0 = _token0
|
||||
token1 = _token1
|
||||
exchange = _exchange
|
||||
|
||||
Reference in New Issue
Block a user