suberra / funnel-contracts

Funnels are smart contracts that enforces renewable allowance as a proxy
MIT License
9 stars 0 forks source link

Incorrect error thrown on transferFrom #59

Closed zlace0x closed 1 year ago

zlace0x commented 1 year ago

Currently after the fix for #32 the error thrown when baseToken has no or insufficient allowance to Funnel is InsufficientRenewableAllowance

This does not reflect the actual cause of error which is the lac of underlying baseToken allowance.

zlace0x commented 1 year ago

The plan is to only apply baseToken allowance check on the external allowance() function, this satisfies EIP-20 requirement of allowance() returning the amount that can be transferFrom().

transferFrom() no longer checks baseToken allowance as the base erc20 will handle the case correctly.