Raze Frontend Architecture
Framework and Technology
Vue UI framework
ElementUI
Vuex
Vue router
Project setup
Compiles and hot-reloads for development
Compiles and minifies for production
Customize Configuration
How to Interact with the Vue Frontend
src/razeClient.js
exports a JS objectrazeApp
, which provides all necessary APIs to interact with the contract:initRazeEthClient
: initialize a client to interact with a specific Raze contract that has been deployed on a chain;razeEthLogin
: retrieve contract status from the chain for a Raze account secretrazeEthRegister
: register a Raze account with a provided secretrazeEthDeposit
: deposit certain amount of native tokens on the Raze contractrazeEthWithdraw
: withdraw a certain amount of native tokens from the Raze contractrazeEthTransfer
: transfer a certain amount of Raze tokens from one account to another
When the frontend project initializes, it imports
razeClient
insrc/main.js
, creates a client instance throughinitRazeClient
, and stores it in a vue instance, so that the whole frontend can call the above APIs through$raze
.
Last updated