This repository contains an implementation of the front-end and NEAR protocol interaction via RPC API. The smart contract implementation: Katherine Fundraising 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 Dapp. Metayield needs to interact with Metapool smart contract to fetch specific data, eg stNEAR price.
- clone this repo locally
git clone https://github.com/Narwallets/meta-yield
- install dependencies
yarn
- open next.config.js and set the CONTRACT_ID env variable with the katherine fundraising smart contract and set METAPOOL_CONTRACT_ID en variable with the MetaPool smart contract.
module.exports = {
reactStrictMode: true,
env: {
CONTRACT_ID: 'dev-1647362531405-23502905659580',
METAPOOL_CONTRACT_ID: 'meta-v2.pool.testnet'
}
}
- 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 and METAPOOL_CONTRACT_ID env variables
vercel env add NEXT_PUBLIC_CONTRACT_ID
vercel env add NEXT_PUBLIC_METAPOOL_CONTRACT_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
vercel env add NEXT_PUBLIC_METAPOOL_CONTRACT_ID