Uploaded image for project: 'Fabric'
  1. Fabric
  2. FAB-18275

Extend account-based token Go chaincode sample for full ERC-20 support

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Medium
    • Resolution: Done
    • None
    • None
    • fabric-samples
    • None

    Description

      https://github.com/hyperledger/fabric-samples/tree/master/token-account-based

      introduced an account-based token sample.

      This token sample should be extended to include full ERC-20 support:

      https://eips.ethereum.org/EIPS/eip-20

      The existing sample has BalanceOf() and Transfer() support.

      I'd suggest a series of 4 PRs:

      1st PR

      • TotalSupply()

      2nd PR

      • Approve()
      • Allowance()
      • TransferFrom()

      3rd PR

      • Transfer chaincode event
      • Approve chaincode event

      4th PR

      • Move from directory token-account-based/chaincode-go to token-erc20/chaincode-go, and update root fabric-samples readme to match.

      5th PR

      • Add Burn() function. (Similar to Mint function, Burn is not in the ERC20 spec but is often implemented). 

      For a similar sample in node.js chaincode, see https://github.com/hyperledger/fabric-samples/pull/327. We should get to functional parity between these samples.

       

      Attachments

        Activity

          People

            jcastrence Julian Castrence
            denyeart David Enyeart
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: