Git Product home page Git Product logo

addtokentowallet's Introduction

AddTokentoWallet

AddTokenToWallet

Today we bring you a very easy but nonetheless valuable lesson that helps you quickly add a token to your wallet with a button on your website!

This could apply to Project Teams, Aggregator service providers, Analytics Providers and general Users at large who want to learn more and play with Web3 things.

What you need:

VS Code with “Live Server” extension installed

Contract address of the token(s) you want to add

A free Netlify or Vercel account (or any other cloud hosting service of your choice) if you want to publish it to your friends or on the www

All you have to do, is replace the Token Address, Symbol, Decimals and image location in the code above with your own respective details. The example above uses the Blocktools Uni V2 LP Token which TOOLS holders receive as free rewards for staking their TOOLS, here is what the “Add to Wallet” button looks like on the dashboard.


Tips:

1. Create a folder and give it a name

2. Save the .js as app.js in that folder (beginners can just copy paste the contents into a notepad and save)

3. Save the html as index.html in the same folder

4. Open the folder on VS Code, Click Go-live on the bottom right (this will show up if you have installed Live Server extension

5. That’s it! Your Add to Wallet button is ready for use!
Play with it: Give it a proper UI, use it in conjunction with the other Learn2Earn apps from earlier lessons, Add more tokens to the list. Scale!

Happy Building!

addtokentowallet's People

Contributors

blocktoolbox 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.