Skip to content

Latest commit

 

History

History
64 lines (49 loc) · 2.13 KB

README.md

File metadata and controls

64 lines (49 loc) · 2.13 KB

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.