WETH10 / WETH10

revamped contract
GNU General Public License v3.0
213 stars 116 forks source link

feat: approve and call #80

Closed alcueca closed 3 years ago

alcueca commented 3 years ago

After carefully reviewing the existing discussion and alternatives, I thought that adding an approveAndCall function was reasonable, with no downside.

transferAndCall is a superior method, if just for the reason that it requires less storage ops, and the point of it is breaking from the approve and transfer pattern.

Plenty of other methods have been suggested, but in my opinion it is enough to offer in WETH10 the permit and the andCall patterns. If anything, a withdrawAndCall might be considered.

Fixes #73