Code Monkey home page Code Monkey logo

metamask-snap-erc20-purchase's Introduction

ERC20 Token Manager Snap

WARNING

Do not use.

Overview

The ERC20 Token Manager Snap is a MetaMask Snap that allows users to interact with ERC20 tokens directly from their MetaMask wallet. This snap provides functionality to view token details, approve token spending, and transfer tokens.

Features

  • Get token details (name, symbol, decimals)
  • Approve token spending
  • Transfer tokens
  • User-friendly dialogs for confirmations and notifications

Prerequisites

  • MetaMask Flask (the developer version of MetaMask that supports Snaps)
  • Node.js and npm

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/erc20-token-manager-snap.git
    cd erc20-token-manager-snap
    
  2. Install dependencies:

    npm install
    
  3. Build the snap:

    npm run build
    
  4. Serve the snap locally:

    npm run serve
    

Usage

  1. Ensure MetaMask Flask is installed and running in your browser.

  2. Navigate to http://localhost:8000 in your browser.

  3. Click "Connect to MetaMask" to connect the snap to your MetaMask wallet.

  4. Use the provided buttons to interact with ERC20 tokens:

    • "Get Token Details": Retrieve information about a specific ERC20 token.
    • "Approve Token": Approve spending of a token by another address.
    • "Transfer Token": Transfer tokens to another address.

Development

To make changes to the snap:

  1. Modify the code in src/index.js.
  2. Rebuild the snap:
    npm run build
    
  3. Restart the server:
    npm run serve
    

Testing

(Add information about your testing setup and how to run tests)

Security Considerations

This snap interacts with ERC20 tokens and can initiate transactions. Always verify the token addresses and transaction details before confirming any operations.

metamask-snap-erc20-purchase's People

Contributors

mkeefeanalog avatar jamesyoung 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.