ꜩtoken

Manage, create and read all about our implementation of the
ERC20 token contract for Tezos - the ꜩtoken

Create your token

To create your token, you will need to run the transactions manually from your tezos-node. In future, we will look to integrate this process directly into this website.

Contract Code

Complete the output above to generate your token origination code here
   

Manage your tokens

Enter your token contract and an address to check, and we will pull the balance

Transfer Tokens

To transfer tokens, enter your token address, who you are sending it to, who you are sending from, and how much. We will construct to command for you to enter into your node to complete the transfer.

Transfer Command

Complete the output above to generate your token transfer code here
   

The smart contract powering ꜩtoken has been written in fi, and compiled into valid Michelson code. Please view the source below.

struct TokenData( string name, string symbol, nat decimals ); struct PassthroughData( address from, mutez amount, bytes contractData ); storage bmap[address=>mutez] balances; storage TokenData data; entry transfer(address to, mutez amount, ?bytes contractData){ assert(storage.balances.in(SENDER)); let mutez bal = storage.balances.get(SENDER); assert(bal >= input.amount); storage.balances.push(SENDER, sub(bal, input.amount)); bal = mutez 0; if (storage.balances.in(input.to)){ bal = storage.balances.get(input.to); } storage.balances.push(input.to, add(bal, input.amount)); if (isset(input.contractData)){ transfer(input.to, mutez 0, new PassthroughData(SENDER, input.amount, to_some(input.contractData))); } }
parameter bytes;storage (pair (big_map address mutez) (pair string (pair string nat)));code{DUP;CDR;NIL operation;PAIR;SWAP;CAR;DUP;PUSH nat 4;PUSH nat 0;SLICE;IF_NONE{PUSH nat 100;FAILWITH}{};DUP;PUSH bytes 0x19308cc0;COMPARE;EQ;IF{DROP;DUP;SIZE;PUSH nat 4;SWAP;SUB;DUP;GT;IF{}{PUSH nat 102;FAILWITH};ABS;PUSH nat 4;SLICE;IF_NONE{PUSH nat 101;FAILWITH}{};UNPACK (pair address (pair mutez (option bytes)));IF_NONE{PUSH nat 103;FAILWITH}{};PAIR;NONE mutez;PAIR;SENDER;DIP{DUP;CDDDAR};MEM;DIP{PUSH bool True};COMPARE;EQ;IF{}{PUSH string "Failed assert";FAILWITH};SENDER;DIP{DUP;CDDDAR};GET;IF_NONE{PUSH string "Key not found in map";FAILWITH}{};SWAP;SET_CAR;DUP;CAR;DIP{DUP;CDADAR};COMPARE;GE;IF{}{PUSH string "Failed assert";FAILWITH};SENDER;DIP{DUP;CAR;DIP{DUP;CDADAR};SUB;SOME};DIIP{DUP;CDDDAR};UPDATE;SWAP;SET_CDDDAR;PUSH mutez 0;SWAP;SET_CAR;DUP;CDAAR;DIP{DUP;CDDDAR};MEM;DIP{PUSH bool True};COMPARE;EQ;IF{DUP;CDAAR;DIP{DUP;CDDDAR};GET;IF_NONE{PUSH string "Key not found in map";FAILWITH}{};SWAP;SET_CAR}{};DUP;CDAAR;DIP{DUP;CAR;DIP{DUP;CDADAR};ADD;SOME};DIIP{DUP;CDDDAR};UPDATE;SWAP;SET_CDDDAR;DUP;CDADDR;IF_NONE{PUSH bool False}{DROP;PUSH bool True};DIP{PUSH bool True};COMPARE;EQ;IF{DUP;CDADDR;IF_NONE{PUSH string "Optional value is empty";FAILWITH}{};DIP{DUP;CDADAR};SWAP;PAIR;DIP{SENDER};SWAP;PAIR;DIP{PUSH mutez 0};DIIP{DUP;CDAAR;CONTRACT (pair address (pair mutez bytes));IF_NONE{PUSH string "Invalid contract";FAILWITH}{}};TRANSFER_TOKENS;DIP{DUP;CDDAR};CONS;SWAP;SET_CDDAR}{};CDDR}{DROP;PUSH nat 400;FAILWITH}}

ꜩtoken is an implentation of the ERC20 token used by ethereum, and is written in fi (the high-level language developed by TezTech Labs). Check us out on Github or follow us on Twitter.

ꜩtoken is a working standard that can be used by anyone, and has similar features to the ERC20 and ERC223 contracts (namely being able to send tokens to smart contracts).

Other tools we are working on include:

  • TezBox - multi-platform Tezos wallet, with a MetaMask like chrome plugin as well as mobile, desktop and web implemntations in development
  • eztz.js - powerful web3-inspired JS library which integrates with the chain
  • fi - currently in alpha, an interpreted language that compiles to valid Michelson (which was used to develop this Token Contract)
  • TezRPC - a load-balanced Tezos RPC proxy service currently used by my tools and the community
  • BakeChain - a GUI tezos baker that allows users to solo-bake from home without needing to compile the native tezos-node.
  • Velos - a layer-2 transaction scaling system
  • TezVote - an on-chain vote signalling tool for delegators and delegation services.
  • and more...