Hi, I am trying to simulate a call to UniswapV2Router02.swapExactETHForTokens() (link)
That method returns a uint[], so I tried mocking that using: abi.rawEncode([ "uint[]" ], [ [1] ])
Here is the complete method mock definition:
await uniswapV2Router02.givenMethodReturn(
uniswapEncorder.encodeRouterETHForTokens(),
abi.rawEncode([ "uint[]" ], [ [1] ])
);
Is it possible to encode an array of values?
Thanks!
Hi, I am trying to simulate a call to UniswapV2Router02.swapExactETHForTokens() (link)
That method returns a uint[], so I tried mocking that using:
abi.rawEncode([ "uint[]" ], [ [1] ])Here is the complete method mock definition:
Is it possible to encode an array of values?
Thanks!