Darwin-Coin / darwin-token-contracts

Darwin Protocol Smart Contracts
https://darwinprotocol.io
0 stars 0 forks source link

Darwin Transfer underflow error #51

Closed SonOfMosiah closed 1 year ago

SonOfMosiah commented 1 year ago

When an account attempts to transfer more Darwin than their balance, there is an underflow with panic code 0x11.

This will revert the call which is intended functionality, but it's an error to have an underflow. We should catch this error before it occurs with either a require statement or custom error.

kingofclubstroyDev commented 1 year ago

this will be resolved, I am rewriting the darwin contract and inheriting from erc20

SonOfMosiah commented 1 year ago

@kingofclubstroyDev I see the pull request for the new darwin token contract. Are we still planning on importing OZ erc20?

kingofclubstroyDev commented 1 year ago

it inherits from a an erc20 contract that has an additional set balances function

SonOfMosiah commented 1 year ago

I see. The import is in Tokenomics2.sol.

SomeTimesIInvent commented 1 year ago

Can we close this with the new contract implemented?

@SonOfMosiah @thesios