gnosis / token-lock

Lock ERC-20 tokens for a pre-defined amount of time
GNU Lesser General Public License v3.0
26 stars 26 forks source link

Transfer Event To and From are Backwards. #29

Open bh2smith opened 2 years ago

bh2smith commented 2 years ago

When a user deposits GNO, the Transfer event of the LGNO token has recipient as "from" and contract as "to":

https://github.com/gnosis/token-lock/blob/544a97d8320d323ebaf7c93ef1946d7f3f5e5ec6/packages/contracts/contracts/TokenLock.sol#L61

rmeissner commented 2 years ago

Same applies to the event in the withdraw method

bh2smith commented 2 years ago

The really unfortunate thing about this issue is that even with contract upgrade, all the historical events emitted by the contract prior to upgrade will forever have these fields reversed. Might even be more of an accounting headache to fix it and also messing up all the tax accounting software.