Skip to content

Latest commit

 

History

History
94 lines (59 loc) · 2.25 KB

File metadata and controls

94 lines (59 loc) · 2.25 KB

Query Blockchain Balance

This project was:

  • Created by following a Moralis Web3 tutorial found here.

Table of Contents

Setup project

  1. Clone and install dependencies:

    npm i
  2. Setup ENV variables:

    • Copy /.env-sample as /.env file, and enter your info for each ENV variable:

      • MORALIS_APIKEY:

        Can be found by logging into your Moralis account and going to the Web3 APIs page.

      • WALLET_ADDRESS:

        Copy the test wallet address you want to check the balance for.

        • TODO: replace this static address with a MetaMask/WalletConnect authorization. (topher)
  3. Start the project in development mode:

    npm run dev
  4. Test your project:

    • Go to http://localhost:3000
    • Test the following pages:
      • Native Balance: http://localhost:3000/native
      • API Balances: http://localhost:3000/api/balances

Available Scripts

In the project directory, you can run:

npm run dev

Starts the application in development mode (hot-code reloading, error reporting, etc).

See next dev --help for more info.

npm run lint

Run ESLint on every file in specified directories.
If not configured, ESLint will be set up for the first time.

See next lint --help for more info.

npm start

Starts the application in production mode.
The application should be compiled with npm run build (which runs next build) first.

See next start --help for more info.

npm run build

Compiles the application for production deployment.

See next build --help for more info.