dapphub / ds-token

A simple and sufficient ERC20 implementation
https://dapp.tools/dappsys/ds-token.html
GNU General Public License v3.0
224 stars 76 forks source link

rely/deny #14

Closed nanexcool closed 6 years ago

nmushegian commented 6 years ago

?? @dbrock simplification ?

nanexcool commented 6 years ago

@nmushegian he suggested uint(-1) instead of 2 ** 256 - 1

nmushegian commented 6 years ago

ah I was looking at the diff before the use of a CONSTANT was restored

nmushegian commented 6 years ago

I'm not sure about the use of a magic constant for this... seems like the caller could also have that as some magic value also, or try to maintain a double entry, or something like that.

making it explicit would require an extra storage per entry and lookup per lookup

nmushegian commented 6 years ago

what do you think of this https://github.com/dapphub/ds-token/pull/15

nanexcool commented 6 years ago

@nmushegian looks good! I like how you handle allowance... how will you set it? something like:

function meme(address dst, bool yay) {
    deps[msg.sender][dst] = yay;
}

Also what about name, symbol and decimals? Or are you burning the whole house down??

nmushegian commented 6 years ago

@nanexcool

Also what about name, symbol and decimals? Or are you burning the whole house down??

no survivors =]]]

nmushegian commented 6 years ago

closing this in favor of https://github.com/dapphub/ds-token/pull/15