Coder Social home page Coder Social logo

davesag / erc884-reference-implementation Goto Github PK

View Code? Open in Web Editor NEW
42.0 13.0 17.0 568 KB

An Interface and Reference Implementation of the ERC-884 DGCL Token.

Home Page: https://medium.com/coinmonks/tokenising-shares-introducing-erc-884-cc491258e413

License: MIT License

JavaScript 100.00%
smart-contracts erc20 erc20-tokens erc-884 reference-implementation

erc884-reference-implementation's Introduction

ERC884-reference-implementation

Greenkeeper badge

An Interface and Reference Implementation of the ERC-884 Delaware General Corporate Law compliant (DGCL) token.

Branch Status Coverage
develop CircleCI codecov Work in progress — updating for Truffle V5
master CircleCI codecov Last stable release

Status

An ERC-884 token is an ERC-20 compatible token that is compliant with Delaware General Corporate Law.

Development

The smart contracts are implemented using Solidity 0.4.24.

Development Prerequisites

  • NodeJS, version 10 (I use nvm to manage Node versions — brew install nvm.) note does not work with Node 12.
  • truffle, which is a comprehensive framework for Ethereum development. npm install -g truffle — this should install Truffle v5.0.1 or better. Check that with truffle version.

Initialisation

npm install

Testing

Standalone

npm test

or with code coverage

npm run test:cov

From within Truffle

Run the truffle development environment

truffle develop

then from the prompt you can run

compile
migrate
test

as well as other Truffle commands. See truffleframework.com for more.

Linting

You can use the following linting options

  • npm run lint:sol — to lint the Solidity files, and
  • npm run lint:js — to lint the Javascript.

Contributing

Please see the contributing notes.

erc884-reference-implementation's People

Contributors

davesag avatar greenkeeper[bot] avatar greenkeeperio-bot avatar mohoff 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

Watchers

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

erc884-reference-implementation's Issues

An in-range update of prettier is breaking the build 🚨

The devDependency prettier was updated from 1.17.1 to 1.18.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

prettier is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your tests failed on CircleCI (Details).

Release Notes for 1.18.0

🔗 Release Notes

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Update swapped shareholder's holderIndex

Hi,
just going through the reference implementation. In your current implementation, the holder index of the swapped (last) address in shareholders is not updated on pruning addr, although it changes from holderIndex[shareholders.length-1] to holderIndex[addr].

I think after L351 there should be a line:

holderIndices[shareholders[shareholders.length - 1]] = holderIndices[addr]

Please let me know if I'm wrong in this.

Getting Runtime Error: out of gas, when trying to mint tokens to verified address

Hello,
I wanted to use ERC-884 reference implementation, but after i correctly added a verified address ( isVerified is true), then after i call mint function to mint 10 tokens i get

[20:55:18] eth_accounts
[20:55:18] eth_call
[20:55:18] eth_getBalance
[20:55:18] eth_call
[20:55:18] eth_sendTransaction
[20:55:18]   Transaction: 0xa44cf77196ff4c042dceecb3cb46bdfcf513140cc08d2688ea9aab785b95f0d2
[20:55:18]   Gas usage: 90000
[20:55:18]   Block Number: 8
[20:55:18]   Block Time: Fri May 18 2018 20:55:18 GMT+0200 (CEST)
[20:55:18]   Runtime Error: out of gas

my gasprice is 20000000000 and my account has ~100 ETH in it.

I tried to debug it with truffle debugger and is fails for some reason in super.mint ? ;o

43:   function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
44:     c = a + b;
45:     assert(c >= a);
        ^^^^^^^^^^^^^^ 

debug(development:0x8fceae28...)> 

StandardToken.sol:

45:    * @param _value The amount of tokens to be spent.
46:    */
47:   function approve(address _spender, uint256 _value) public returns (bool) {
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

debug(development:0x8fceae28...)> 

MintableToken.sol:

30:    */
31:   function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
32:     totalSupply_ = totalSupply_.add(_amount);
                       ^^^^^^^^^^^^^^^^^^^^^^^^^ 

debug(development:0x8fceae28...)> 

MintableToken.sol:

30:    */
31:   function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
32:     totalSupply_ = totalSupply_.add(_amount);
        ^^^^^^^^^^^^                             

debug(development:0x8fceae28...)> 

MintableToken.sol:

30:    */
31:   function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
32:     totalSupply_ = totalSupply_.add(_amount);
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 

debug(development:0x8fceae28...)> 

Transaction halted with a RUNTIME ERROR.

Any idea what could be wrong here ? Unit test seem to run okay, gas price seems okay, i use the owner account for it etc.

An in-range update of eslint-plugin-node is breaking the build 🚨

The devDependency eslint-plugin-node was updated from 9.0.1 to 9.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your tests failed on CircleCI (Details).

Commits

The new version differs by 3 commits.

  • 7ce77f9 🔖 9.1.0
  • e5aee3c 🐛 support * in engines.node (fixes #155)
  • fd9d19d no-deprecated-api adheres to targeted node version (fixes #141) (#164)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Thanks

Thanks for this reference implementation. I am seeking a security token template I can actually use and this one seems to be the closest to fulfilling all my requirements. Have you seen the other security token standard proposals (1400/1410/1411, 1404, 1450...) and what is your opinion on them, if any?

An in-range update of eslint-plugin-prettier is breaking the build 🚨

The devDependency eslint-plugin-prettier was updated from 3.0.0 to 3.0.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-prettier is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your tests failed on CircleCI (Details).

Commits

The new version differs by 15 commits.

  • d4231c2 Build: update package.json and changelog for v3.0.1
  • 4a0e57d Catch and format SyntaxErrors as eslint violations (#141)
  • d34daed build(deps-dev): bump eslint from 5.11.0 to 5.11.1
  • 7f4f45d build(deps-dev): bump eslint from 5.10.0 to 5.11.0
  • 5be3bcf build(deps-dev): bump eslint-plugin-eslint-plugin from 2.0.0 to 2.0.1
  • 11e7c44 build(deps-dev): bump eslint from 5.9.0 to 5.10.0
  • 9e5bf14 build(deps-dev): bump eslint-plugin-eslint-plugin from 1.4.1 to 2.0.0
  • 234583a build(deps-dev): bump vue-eslint-parser from 4.0.2 to 4.0.3
  • 8675d57 build(deps-dev): bump vue-eslint-parser from 3.3.0 to 4.0.2
  • 2379e93 Upgrade: Bump vue-eslint-parser from 3.2.2 to 3.3.0
  • 3ea0021 Upgrade: Bump eslint-config-prettier from 3.1.0 to 3.3.0
  • c774fb8 Upgrade: Bump eslint from 5.8.0 to 5.9.0
  • 2a4fba0 build(deps-dev): bump eslint-plugin-node from 7.0.1 to 8.0.0 (#121)
  • 29caa29 build(deps-dev): bump eslint-plugin-eslint-plugin from 1.4.0 to 1.4.1 (#120)
  • 2836350 build(deps-dev): bump eslint from 5.6.0 to 5.8.0 (#119)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • The engines config in 1 of your package.json files was updated to the new Node.js version

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of husky is breaking the build 🚨

The devDependency husky was updated from 1.3.0 to 1.3.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

husky is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your tests failed on CircleCI (Details).

Commits

The new version differs by 6 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of eslint-config-prettier is breaking the build 🚨

The devDependency eslint-config-prettier was updated from 3.4.0 to 3.5.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-config-prettier is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your tests failed on CircleCI (Details).

Commits

The new version differs by 4 commits.

  • 261d47c eslint-config-prettier v3.5.0
  • a3275ee Update dependencies
  • 9072c91 Add new Vue rules coming in the next eslint-plugin-vue version
  • 6c4d1f0 Revert the Vue changes from commit 089a7b53 (PR #69)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of solhint is breaking the build 🚨

The devDependency solhint was updated from 1.4.1 to 1.5.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

solhint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your tests failed on CircleCI (Details).

Commits

The new version differs by 21 commits.

  • 79feec3 Add version 1.5.0
  • 416aff7 Update changelog
  • e3aa88f Snake case now allows for a (single) leading underscore. (#93)
  • f985588 Update CONTRIBUTING.md (#95)
  • fb52933 Merge pull request #91 from nventuro/feat/disable-previous-line
  • 99efbf9 Merge branch 'directive-tests' into feat/disable-previous-line
  • 3c0bb6c Add test for multiline disable-previous-line comment
  • b963b98 Fixed some comment directive tests.
  • f174345 Added disable-previous-line.
  • f389547 Merge pull request #89 from nventuro/patch-3
  • 77e1f68 Update solhint.js
  • d809263 Update rules.md (#88)
  • 391f70e Update solhint.js
  • 8726e30 Update 'Back Us' section indentation
  • fd36d65 Add ETH donation badge

There are 21 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

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.