Fix v6.0.1
- fix typo in RFQ contract
- change handling logic for makerToken as ETH in RFQ contract
- add two parameter to Swap event in GS contract
This PR primarily aims to adjust the handling logic for makerToken as ETH in the RFQ contract:
Prior to this PR, when makerToken is ETH, RFQ directly unwraps WETH into ETH. This isn't ideal, especially when RFQ is only a segment of the entire swap path. If RFQ unwraps WETH into ETH directly, it requires the subsequent swapping process to wrap ETH back into WETH, incurring additional steps and costs.
With this PR, we don't unwrap WETH directly. WETH is only unwrapped to ETH when the makerToken is ETH. This could avoid additional steps or costs associated with handling WETH.
fix handling logic for makerToken as ETH in RFQ contract
This does not feel like a "fix". This is changing how we treat WETH as maker token:
- before this PR: ETH == WETH
- No ETH as maker token allowed; WETH as maker token means ETH as maker token, we converts it to ETH and send it to recipient
- after this PR: ETH != WETH
- WETH as maker token is the same as other ERC20 tokens, we will not convert it to ETH anymore; ETH as maker token means we will convert WETH to ETH and send it to recipient
Please add a readme or a natspec/comment for how we handle different maker tokens, to help others better understand how it works.
In RFQ,
- if maker token is ETH, ...
- if maker token is WETH, ...
- if maker token is normal ERC20, ...