Code Monkey home page Code Monkey logo

ds-token's Introduction

DSToken

An ERC20 Token with wholesome memes

Provides a standard ERC20 token interface plus DSAuth-protected mint and burn functions; binary approval via MAX_UINT; as well as push, pull and move aliases for transferFrom operations.

Custom Actions

mint

credit tokens at an address whilst simultaniously increasing totalSupply (requires auth)

burn

debit tokens at an address whilst simultaniously decreasing totalSupply (requires auth)

Aliases

push

transfer an amount from msg.sender to a given address (requires trust or approval)

pull

transfer an amount from a given address to msg.sender (requires trust or approval)

move

transfer an amount from a given src address to a given dst address (requires trust or approval)

ds-token's People

Contributors

apmilen avatar brianmcmichael avatar d-xo avatar dbrock avatar desaperados avatar gakonst avatar gbalabasquer avatar mbrock avatar mrchico avatar nanexcool avatar nmushegian avatar rainbreak avatar xwvvvvwx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ds-token's Issues

erc20 interface been broken

symbol & name of the token should be defined as a string, but you defined as byte32, which breaks the erc20 interface.

so when I use the standard erc20 interface to unpack dstoken, I get errors

abi: cannot marshal in to go slice: offset 35000214728014336407470934256024915466671168103574785725052718905953538277408 would go over slice boundary (len=32)

you can refer to this token contract(mkr): https://etherscan.io/address/0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2#code

some missing contacts and wrong paths

I was about to do a pull request with fixed contract paths that I noticed some contracts such as auth.sol is missing from the files.

some other contracts have wrong paths, e.g /token/ and /data/ directories

  • from front-end.sol
import 'auth.sol';
import 'token/controller.sol';
import 'token/event_callback.sol';
import 'token/token.sol';
  • from controller.sol
 import 'auth.sol';
import 'data/approval_db.sol';
import 'data/balance_db.sol';
import 'token/erc20.sol';
import 'token/event_callback.sol';
import 'token/frontend.sol';
import 'token/token.sol';

import 'util/safety.sol';

name brainstorming

start -> flow

stoppable -> stops, make ds-stops

approve -> ?

transfer -> handled by push

transferFrom -> move, also pull for natural case

(keep erc20 names for compatability. ew!)

Intentional use of accounting terms?

I'm wondering if the use of the words 'debit' and 'credit' in the definitions of 'mint' and 'burn' are intentionally used in the technical accounting sense of the term or not. The current wording implies that accounts are credit-normal (like a liability) and the total supply is debit-normal (like an asset). If that's the case, I think that that should be made explicit in the readme and the verbiage on

ds-token/README.md

Lines 18 to 24 in 13e0934

#### `mint`
credit tokens at an address whilst simultaniously increasing `totalSupply`
(requires auth)
#### `burn`
debit tokens at an address whilst simultaniously decreasing `totalSupply`
(requires auth)
should change to read more like

#### `mint`
increase (credit) tokens at an address whilst simultaneously increasing (debiting) `totalSupply`  
(requires auth) 

#### `burn` 
decrease (debit) tokens at an address whilst simultaneously decreasing (crediting) `totalSupply`  
(requires auth)

Can not run `dapp create` with string or bytes32

I compiled with solc:0.5.12 successfully and failed to run dapp create with nor string or bytes32

it shows the error:

hevm: could not parse abi argument: 0x494f550000000000000000000000000000000000000000000000000000000000 : string

Could not compile code

I'm sure I'm doing something wrong... but not sure what.

Trying to compile token.sol and it fails at the import statements.

Suggesting updates on the doc of DSToken.transferFrom

Hi,

The function DSToken.transferFrom emits an event Transfer, which is not documented in the README doc.

emit Transfer(src, dst, wad);

A potential fix could be adding "Emits a Transfer event" to the README doc.

Furthermore, function DSToken.transfer calls the function transferFrom. So it also emits the event Transfer.

return transferFrom(msg.sender, dst, wad);

A potential fix could be also adding "Emits a Transfer event" to this function in the README doc.

Could you please check it?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.