Skip to content

Send NEAR fungible tokens to many accounts with one single transaction

Notifications You must be signed in to change notification settings

Learn-NEAR-Club/fungible_token_multisender

 
 

Repository files navigation

fungible_token_multisender

This React app was initialized with create-near-app

Quick Start

To run this project locally:

  1. Prerequisites: Make sure you've installed Node.js ≥ 12

  2. Install dependencies: yarn install

  3. Export TOKEN_CONTRACT

       export FT_CONTRACT_NAME="lnc.factory.tokenhub.testnet" 

    modify src/.env file with FT_CONTRACT_NAME="lnc.factory.tokenhub.testnet"

  4. Go to src/config.js and comment all FT_CONTRACT .env declarations

    //from this
    
    const FT_CONTRACT = process.env.FT_CONTRACT_NAME || 'lnc.factory.tokenhub.testnet',
    ftContractName: FT_CONTRACT,
    ...
    //to this
    
    //const FT_CONTRACT = process.env.FT_CONTRACT_NAME || 'lnc.factory.tokenhub.testnet',
    //ftContractName: FT_CONTRACT,
  5. Run yarn start

  6. Then uncomment lines in config.js and save it. Go to src/config.js and uncomment all FT_CONTRACT .env declarations

    //from this
    
    //const FT_CONTRACT = process.env.FT_CONTRACT_NAME || 'lnc.factory.tokenhub.testnet',
    //ftContractName: FT_CONTRACT,
    ...
    //to this
    
    const FT_CONTRACT = process.env.FT_CONTRACT_NAME || 'lnc.factory.tokenhub.testnet',
    ftContractName: FT_CONTRACT,

This actions with comment/uncomment lines needs for easily run server on localhost with yarn start. If we don't comment this lines it may be conflict between neardev-env and .env with FT_CONTRACT.

Always save config.js after uncomment, FT_CONTRACT methods are very important to multisender!

Troubleshooting

On Windows, if you're seeing an error containing EPERM it may be related to spaces in your path. Please see this issue for more details.

About

Send NEAR fungible tokens to many accounts with one single transaction

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 71.1%
  • CSS 13.7%
  • Rust 12.9%
  • HTML 2.2%
  • Shell 0.1%