build: router#16
Conversation
fp-crypto
left a comment
There was a problem hiding this comment.
Seems pretty straightforward.
| @@ -0,0 +1,34 @@ | |||
| // forked from https://github.com/Uniswap/v3-periphery/blob/main/contracts/base/Multicall.sol | |||
There was a problem hiding this comment.
guess i removed the interface andd added the comment to the function
| } | ||
| } | ||
|
|
||
| abstract contract IWETH9 is ERC20 { |
There was a problem hiding this comment.
Why is this an abstract contract instead of an interface?
There was a problem hiding this comment.
Already had the ERC20 dependency i guess
There was a problem hiding this comment.
FWIW these two contracts were just basically copied from the 4626 Router that was forked from FEI https://github.com/yearn/Yearn-ERC4626-Router/tree/master/src/external
|
|
||
| import {IPermit2} from "./IPermit2.sol"; | ||
|
|
||
| contract STBRouter is Multicall, PeripheryPayments { |
There was a problem hiding this comment.
I'm feeling dumb ... isn't PeripheryPayments completely open to all callers?
There was a problem hiding this comment.
yes. Any tokens left in the router after a txn can get pulled by anyone.
The idea is the multicall allows any of them to be used through a delegatecall
There was a problem hiding this comment.
do you know if the rationale for Uniswap was to not keep internal accounting, and thus simplify the implementation?
|
|
||
| import {IPermit2} from "./IPermit2.sol"; | ||
|
|
||
| contract STBRouter is Multicall, PeripheryPayments { |
There was a problem hiding this comment.
do you know if the rationale for Uniswap was to not keep internal accounting, and thus simplify the implementation?
No description provided.