Skip to content

ademyalcin27/demo-nuxt3-blockchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is prepared by Vue Forge Online Conference; Thank you for presenting such a beautiful project for 2 days online and free of charge.

How to Get Started

DevNet Setup

Ecko Wallet Browser Extension

  1. Download Ecko Wallet Browser Extension (currently only available for Google Chrome)
  2. Run through all the steps for the extensions setup wizard (choose “Create New Wallet” if you’ve never used Ecko Wallet before)
  3. At the conclusion of the wizard setup, you can close the tab and use the extension pop-up moving forward.

Setup the Local Devnet and Connect Wallet

  1. Run the following command in the project folder to start the dev network. (You can stop the network with ctrl + c but make sure you have it running while we’re developing)
yarn kadena:devnet
# or
npm run kadena:devnet

The devnet runs on port 8080, so ensure it’s free

  1. Open the Ecko Wallet Chrome extension to connect it to the dev network started by the previous command.
  2. Choose the “Settings” button from the bottom menu
  3. Next, choose “Networks”
  4. Click the “Add a New Network” button.
  5. Fill in the network details as follows:
    1. Network Name: DevNet
    2. New RPC URL: http://127.0.0.1:8080
    3. Block Explorer URL: http://127.0.0.1:8080
    4. Network Id: fast-development
  6. Click the “Save” button
  7. Next, close the extension and open it again to get to the wallet view. Then select the “DevNet” network from the dropdown in the top left corner.
  8. Create a wallet by selecting the vertical three-dots menu in the top right-hand corner, and choosing “Create Wallet”.
  9. Congrats, Ecko Wallet is setup to work with the devnet! 🎉

Fund Account

Next, we need to fund our account on the devnet so we have some digital money (KDA) to work with while we’re developing

  1. Copy your public key from the Ecko Wallet Extension by clicking on it in the top right corner of the extension pop-up

  2. Go back to the terminal in the project folder

  3. In a new terminal tab, run the following command to fund your account

  4. After the required dependencies download, you will be presented with the 2 following prompts:

    1. What account would you like to fund? The answer here is your public key copied in the last step (note it should start with k:)
    2. What public key would you like to use? This is the public key WITHOUT the k:.
yarn kadena:cli --profile=./.fund-profile.json
# or
npm run kadena:cli -- --profile=./.fund-profile.json
  1. If the above command fails, go back to your terminal tab where the devnet is running, stop the process with ctrl + `, and restart it with npm run kadena:devnet.

  2. Awesome! 💪 Your account is now funded with 100 KDA on the devnet. You can view your account balance in the wallet. You should see the KDA balance as well as the USD equivalent.

Local Setup

  1. Ensure you have docker installed and running
  2. Clone the repo or Run with VS Code
git clone repo
  1. Start on the boilerplate branch
git checkout boilerplate
  1. Install the dependencies
yarn
# or
npm install
  1. Start the Supabase service
yarn supabase:start
# or
npm run supabase:start
  1. The needed supabase environment variables will print after the service has started. Duplicate .env.example to .env and provide the following variables from the terminal print out.
# this can stay the same
SUPABASE_URL="http://localhost:3000"
# anon key the terminal print out
SUPABASE_KEY="<your anon key>"
# service role key from the terminal print out
SUPABASE_SERVICE_KEY="<your service_role key>"

You can also retrieve these at any time by running the following:

npx supabase status
  1. Migrate and seed your database with initial schema and values by running:
yarn db:reset
# or
npm run db:reset
  1. Start the dev server
yarn dev
# or
npm run dev

About

Nuxt3 Blockchain demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published