Skip to content

expanse-org/Tokens

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Tokens

This repo contains Solidity smart contract code to issue simple, standards-compliant tokens on Ethereum/Expanse. It can be used to create any form of asset, currency, coin, hours, usage tokens, vunk, etc.

Structure

Balances

Balances are abstracted into in the Balances.sol contract. The balances also has a mapping of addresses that either do or dont have permission to manipulate the data in the balances contract. This allows for the tokens functionality to be extended and allows for business logic to be upgradeable.

Issuance Modules

Issuance modules are modules that extend the functionality of the token. Examples, Standard token, stake, basic income, lottery, etc.

The default IM is StandardToken.sol which ONLY implements the core ERC20 standard functionality #20.

HumanStandardToken.sol is an example of a token that has optional extras fit for your issuing your own tokens, to be mainly used by other humans. It includes:

  1. Initial Finite Supply (upon creation one specifies how much is minted).
  2. In the absence of a token registry: Optional Decimal, Symbol & Name.
  3. Optional approveAndCall() functionality to notify a contract if an approval() has occurred.

There is a set of tests written for the HumanStandardToken.sol using the Truffle framework to do so.

Standards allows other contract developers to easily incorporate your token into their application (governance, exchanges, games, etc). It will be updated as often as possible.

Deploying

  • Launch Balances.sol
  • Launch HumanStandardToken with the contract address you got from deploying balances.sol
  • Update Balances contract by setModule(HumanStandardTokenAddress, true);

Testing

npm install

For getting truffle-hdwallet-provider. Solidity tests have to still be written.

Uses Truffle 3.x.

ethpm

This is published under tokens at ethpm.

Pull requests are welcome! Please keep standards discussions to the EIP repos.

"You get a token, you get a token, everyone gets a token!" - Token the 3rd: the fun gerbil.

Licensed under MIT.

This code is licensed under MIT.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Ethereum / Expanse Token Contracts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%