monerium / smart-contracts

ERC20 compatible e-money deployed on Ethereum
https://monerium.com
Apache License 2.0
36 stars 21 forks source link

V1.2.0 - Integrate ERC2612 Permit and Replace Signature points with ByteArray for Burn Function #42

Closed KristenPire closed 8 months ago

KristenPire commented 9 months ago

ERC2612

The revised process significantly alters the token burning mechanism by changing the flow and responsibilities between the Controller and TokenFrontend contracts:

Initial Process:

  1. Monerium's system invokes the burnFrom function on the TokenFrontend contract.
  2. Subsequently, TokenFrontend calls the BurnFrom_WithCaller function on the Controller contract, leading to the tokens being burned.
  3. Following this, TokenFrontend is responsible for emitting the relevant event.

Revised Process:

  1. Monerium's system now directly calls the burnFrom function on the Controller contract, which results in the tokens being burned.
  2. The Controller contract then calls the burnFrom function on the TokenFrontend, triggering the emission of the event.
  3. Lastly, TokenFrontend calls the Controller's burnFrom_WithCaller function, which in this revision, simply returns without performing any action.

Additionals helper and scripts