Skip to content

Latest commit

 

History

History
62 lines (37 loc) · 1.68 KB

contract.md

File metadata and controls

62 lines (37 loc) · 1.68 KB

Install

Prerequites: hardhat

  • Clone repository: picasarts-contracts
  • Install modules: npm install
  • Compile contracts: npx hardhat conpile
  • Config network in file: hardhat.config.js
  • Deploy contracts: npx hardhat run --network <network> scripts/deploy_all.js
  • Get file config.json and all files in folder abis

Design

Picasarts has 1 governance contract (Hub) and 3 feature contracts (Marketplace, Loan and Rental). For handle logic of feature contracts and futher extending contract, this is design of them:

Smart contracts design

Those also use same a NFT standard contract called PNFT extend from ERC-721, ERC-2981 and ERC-4907. This is not required, you can create new PNFT contract by Hub or just import simple ERC-721 contract that extend Ownable contract but I encourage you use this contract for able using full product features.

PNFT

Use cases and flow

All usecase

Hub

Hub

Marketplace

  • Use cases:

Market use cases

  • Flow:

Market flow

Loan

  • Use cases:

Loan use cases

  • Flow:

Loan flow

  • Explain status after each action:

Loan explain

Rental

  • Use cases:

Rental use cases

  • Flow:

Rental flow

  • Calculate amount can withdraw:

Rental explain