function swapExactTokensForTokens(
uint _amountIn,
uint _amountOutMin,
address[] calldata _path,
address _to,
uint _deadline
) external virtual ensure(deadline) returns (uint[] memory amounts)
const overrides = {
gasLimit: 9999999
}
// ν ν° κ±°λμ λν νμ©
await mockToken0Contract.approve(routerContract.address, MaxUint256)
await mockToken1Contract.approve(routerContract.address, MaxUint256)
// swap
await swapRouterContract.swapExactTokensForTokens(
1000,
0,
[mockToken0Contract.address, mockToken1Contract.address],
accounts[0].address,
MaxUint256,
overrides
)