Coder Social home page Coder Social logo

coreycaplan3 / tokenscript-examples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from smarttokenlabs/tokenscript-examples

0.0 1.0 0.0 1.23 MB

A repo full of complete TokenScripts which you can use for your own tokens that run natively on AlphaWallet iOS and Android

Home Page: https://tokenscript.org

License: MIT License

Shell 100.00%

tokenscript-examples's Introduction

TokenScript-Examples

A repo full of complete TokenScripts which you can use for your own tokens that run natively on AlphaWallet iOS and Android

Why TokenScript?

TokenScripts are signed modules which execute token logic in a secure container. TokenScripts are designed to run on mobile ethereum wallets with a native feel and authenticity protection as each TokenScript is signed by a valid authority, thus tampering can be detected.

If you are a token issuer who wants to provide your token as a service to mobile users, or you want third party developers to use your token logic securly, then TokenScript is the perfect framework for you.

How to benefit from this repository

If you have a token and you want to create your own TokenScript you can easily do so by copying some of the existing examples and fitting your own logic into them.

For generic ERC20 Tokens

Copy the AlphaWallet-Discovery-Token or WETH TokenScript and fit your logic into it. With ERC20 TokenScripts you can easily display relevant information to the user via an action page or execute transaction logic like making deposits or converting your token.

For ERC20 DeFi Tokens

If you have an ERC20 token which is for DeFi use cases, I recommend copying one of the compound cTokens and changing it for your own token.

For ERC721 Tokens (NFT)

Copy the EDCON xml and shtml files and change them for your token. With TokenScripts you can easily localise your business logic for another language, interpret your token ids via a bitmask without a third party service like OpenSea and display your unique tokens via a layout which will be presented to the mobile user in a native like feel.

Trying out TokenScript

FYI, Join our Telegram group https://t.me/AlphaWalletGroup if you need any assistance.

Tokenscript design weekly meetings, Time: 7pm, Thursday (Sydney Time) Weekly,

For iOS:

  1. Install the latest AlphaWallet app from the app store.
  2. In the AlphaWallet app, go to Wallet (first tab) and tap the + button and paste the contract address 0x63cCEF733a093E5Bd773b41C96D3eCE361464942 to make the wallet display the token
  3. Go to our repository at https://github.com/AlphaWallet/TokenScript-Examples/tree/master/examples/EntryToken and AirDrop the files EntryToken.xml, token.en.shtml, shared.css and enter.en.shtml from your Mac to your iPhone. If you have access to the files in mobile Safari, you can also choose to "Open in AlphaWallet" from the iOS share menu
  4. In the AlphaWallet app, go to Wallet tab and tap on the token "TokenScript Test Tokens (TKS)"
  5. In the AlphaWallet app, check the Settings tab > TokenScript Overrides for the list of TokenScript files. Swipe to delete or tap to share. You can AirDrop the files to another iPhone which has AlphaWallet TestFlight installed

For Android:

  1. Install the latest AlphaWallet app from the play store.
  2. In the AlphaWallet app, go to Wallet (first tab) and tap the + button and paste the contract address 0x63cCEF733a093E5Bd773b41C96D3eCE361464942 to make the wallet display the token
  3. Go to our repository at https://github.com/AlphaWallet/TokenScript-Examples/tree/master/examples/EntryToken, run 'make EntryToken.canonicalized.xml' and drag and drop the file into the sdcard/home/AlphaWallet folder (on your android device).
  4. In the AlphaWallet app, go to Wallet tab and tap on the token "TokenScript Test Tokens (TKS)"
  5. In the AlphaWallet app, check the Settings tab > TokenScript Overrides for the list of TokenScript files. Swipe to delete or tap to share.

For more information about TokenScript and its implementation

Visit our main repo here or visit our main website and forum here

Questions?

Feel free to email us at [email protected], we would love to hear any of your questions or comments.

tokenscript-examples's People

Contributors

bitcoinwarrior1 avatar chintanrathod avatar hboon avatar jamessmartcell avatar jzaki avatar zhangzhongnan928 avatar

Watchers

 avatar

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.