MVP of OVNGT interest bearing stablecoin
- Node v16
- Install root packages via npm
npm install
- Install NPX
npm install -g npx
- Open folder vapp
cd vapp
- Install packages via npm
npm install
Create .env file in root project.
Pass env: ETH_NODE_URI_POLYGON - RPC connect to Polygon Node.
- Starting hardhat node (local dev):
npx hardhat node --show-accounts
2 . Run tests
npx hardhat test
- Run web
Open folder vapp and run command:
npm run serve
- Install MetaMask
- Set custom RPC
- Name network: Localhost 8545
- URL: http://localhost:8545
- Chain ID: 31337
- Symbol: MATIC
- Account: deployer: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
- Private Key: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
Private key need to import to Metamask
To prettify solidity code install prettier plugin to VSCode:
code --install-extension esbenp.prettier-vscode
(https://github.com/prettier-solidity/prettier-plugin-solidity#vscode)
Params in .prettierrc
Install plugin (https://plugins.jetbrains.com/plugin/9475-solidity)
Go to directory vapp
Run script and pass arguments:
- $token - auth token
- $url - ssh server name
deploy.sh $token $url
- This script build docker image with frontend content
- Push image to Yandex Cloud
- Connect to server via ssh
- Run command for polling docker image from Yandex Cloud
- After polling it rum restart dapp
- Compile new version of Solidity contract:
truffle compile
- Deploy contract to Polygon:
truffle migration --network polygon
You also need have secrets.json file in project directory
- After deploying, you need to save .json files Contracts:
cp -r vapp/contacts contracts_prod/
- Update .json version Contract for Ovnstable-api service - deploy it
- Build dapp and deploy