Skip to content

Smart contract wallet allowing multiple people to buy, manage, view and sell ERC-20 or ERC-721 tokens

Notifications You must be signed in to change notification settings

commown-shared-wallet/contracts-dapps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CommOwn - Shared Wallet / Contracts & Dapps

badge semantic-release: angular

Repository containing the contracts and the interface of the CommOwn Shared Wallet

Getting Started

  • Clone the repo
    git clone -o seed -b main --single-branch https://github.com/commown-shared-wallet/contracts-dapps.git

Contract

  • Install project dependencies — yarn install
  • Starts a JSON-RPC server — yarn hardhat node

Frontend

  • Open new terminal
  • Position yourself on the frontend directory — cd frontend
  • Install frontend dependencies — yarn install
  • Launch the app — yarn dev, it will become available at http://localhost:3000
  • Add local network to your metamask wallet
    • ChainID — 31337
    • Currency — Ethereum
    • Currency Symbol — ETH
    • Currency decimal's — 18
    • RPC URL — http://127.0.0.1:8545/

Features

INDICATORS

RELEASE DESCRIPTION STATUS
v1.0.x 🛠️ Settings & Technicals Environnement
v1.1.x 👛 Connecting to a wallet
v1.2.x 📦 Creating a CommOwn Shared Wallet & Funds management
v1.3.x 🦾 Create Pocket & Visualize your assets
v1.4.x 👨🏾‍💻 NFT Proposals & Refactoring Pockets
v1.5.x 🛠️ Security amelioration
v1.6.x 🤝🏾 State management with redux 🔁
v1.7.x 💵 Purchase of an NFT 🚧
v1.8.x ⚡️ Resale of NFT 🚧
v1.9.x ⚡️ Lending of NFT 🚧

Directory Structure

├── .github — GitHub configuration including CI/CD workflows
├── .vscode — VSCode settings including code snippets, recommended extensions etc.
├── .husky — Git Hooks, for code quality
├── contracts — Solidity contracts
├── deploy — Automatic deployment script
├── docs — Contracts documentations
├── scripts — Script to deploy contracts
├── test — Script to test contracts
├── frontend — dapp frontend
├──── artifacts — compiled artifacts (build-inf, abi...)
├──── src — react component frontend
├────── assets — Assets such as css, sass, img files
├────── components — Reusable components for pages and layout
├────── hooks — React hooks such as useCommownSW, useCopy, etc.
├────── interface — Objects description.
├────── layout — Reusable page templates
├────── pages — Pages of applications
├────── store — State Management
├────── App.tsx — App Container and Routes
├────── main.tsx — Inject app in index.html
├──── types — Type declaration files for Contracts

├──── index.html — Application entry point

Tech Stack

Requirements

IMPORTANT: Ensure that VSCode is using the workspace versions of TypeScript and ESLint.

Scripts

Repository

  • yarn prepare — Install and configure husky hooks system
  • yarn commit — Run commitizen command line to receive assistance in drafting commit

Backend

Hardhat

  • npx hardhat accounts — Prints the list of accounts
  • npx hardhat compile — Compiles the entire project, building all and generate documentations
  • npx hardhat node — Starts a JS ON-RP C server on top of Hardhat Network
  • npx hardhat docgen — Generate documentations of Smart Contract (NatSpec)
  • npx hardhat check — Run Solhint for static code analysis
  • npx hardhat test — Runs mocha tests
  • npx hardhat test --parallel Run tests in parallel
  • REPORT_GAS=true npx hardhat test — Force report gas for test
  • npx hardhat coverage — Check the percentage of tests coverage
  • npx hardhat clean — Clears the cache a nd deletes all artifacts
  • npx hardhat help — Prints this message
  • npx hardhat run scripts/01_deployCommownSWProxyFactory.ts --network localhost — Deploy CommownSWProxyFactory contract to local network
  • npx hardhat run scripts/01_deployCommownSWProxyFactory.ts --network rinkeby — Deploy CommownSWProxyFactory contract to testnet network
  • TS_NODE_FILES=true npx ts-node scripts/deploy.ts

Linter

  • npx eslint '**/\*.{js,ts}'
  • npx eslint '**/_.{js,ts}' --fix
  • npx prettier '\*\*/_.{json,sol,md}' --check
  • npx prettier '**/\*.{json,sol,md}' --write
  • npx solhint 'contracts/**/_.sol'
  • npx solhint 'contracts/\*\*/_.sol' --fix

Frontend

  • yarn dev — Launches the app in development mode on http://localhost:3000
  • yarn build — Compiles and bundles the app for deployment
  • yarn preview — Preview your build app

How to Update

  • yarn set version stable — Bump Yarn to the latest stable version
  • yarn upgrade-interactive — Update Node.js modules (dependencies)
  • yarn pnpify --sdk vscode — Update TypeScript, ESLint, and Prettier settings in VSCode

Usefull links


Made with ♥ by CommOwn Teams.