This repository contains an implementation of the front-end and NEAR protocolor interaction via RPC API. The smart contract to interact is the one implemented on the NCD Bootcamp - Level 1. TrustMe Smart Contract.
Prerequisites In order to interact with the smart contract, we need it deployed. Once you have it, copy the smart contract account Id that we are going to use on the daap.
- clone this repo locally
git clone https://github.com/leomanza/trust-me-frontend.git
- install dependencies
yarn
- open next.config.js and set the CONTRACT_ID env variable with the trus-me smart contract account id deployed on prerequisites.
module.exports = {
reactStrictMode: true,
env: {
CONTRACT_ID: 'dev-839242103921-12345'
}
}
- run the development server
npm run dev
# or
yarn dev
- clone this repo locally (skip if already done on local env setup)
git clone ...
- install dependencies (skip if already done on local env setup)
yarn
- deploy
vercel
- add CONTRACT_ID env variable
vercel env add NEXT_PUBLIC_CONTRACT_ID
copy/paste contract account id
- clone this repo locally (skip if already done on local/dev env setup)
git clone ...
- install dependencies (skip if already done on local/dev env setup)
yarn
- deploy
vercel --prod
- add CONTRACT_ID env variable (skip if already done on dev env setup)
vercel env add NEXT_PUBLIC_CONTRACT_ID
copy/paste contract account id