Skip to content

itsTrustified/TN-Harmony

Repository files navigation

Trustified Network is a platform to Sell Digital Services Globally and Accept Crypto Payments without paying Hefty Commissions.

Inspiration

“Trust” is a key factor for successful transactions between parties. To ensure trust, we involve third party freelancing platforms or middlemen and pay hefty commissions which highly affect the overall profit margins of parties involved in a transaction.

What it does

Trustified.network is a smart contract assured Escrow Agreement and Payment platform which helps individuals and businesses to grow globally and increase profit margins in four simple steps:

  1. List Products, Services, or subscription packages.
  2. Create Escrow agreements with personalized terms as per customers.
  3. Send/Receive crypto payments in a reliable and secure way without paying hefty commissions to third parties.

Deploy Smart contracts onHarmony

https://github.com/Trustified-Network/TN-Harmony/blob/master/hardhat.config.js

require("dotenv").config({ path: "./.env" });
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-etherscan");

const privateKey = process.env.REACT_APP_PRIVATE_KEY;
const HARMONY_PRIVATE_KEY = process.env.HARMONY_PRIVATE_KEY; 


module.exports = {
  networks: {
    harmony: {
      url: `https://api.s0.b.hmny.io`,
      accounts: [`0x${HARMONY_PRIVATE_KEY}`]
    },
  },

  solidity: {
    version: "0.8.0",
    settings: {
      optimizer: {
        enabled: true,
        runs: 200,
      },
    },
  },
};

contract Address

Harmony Address : 0x4F5ff6B9F76644FC630412409BEBaFC84621539C

IPFS/Filecoin : We are Using Web3.Storage, to permanently store all the details of user invoices and subscription services.

import { Web3Storage } from "web3.storage";

function getAccessToken() { 
    return process.env.REACT_APP_WEB3_STORAGE_API_KEY;
}

function makeStorageClient() {
    return new Web3Storage({ token: getAccessToken() });
  }

  function makeFileObjects(data) {  
    const blob = new Blob([JSON.stringify(data)], {
      type: "application/json",
    }); 

    const files = [new File([blob], "Invoice_Details.json")];
    return files;
  } 

Chainlink : We have used Chainlink 1) Price Feed 2) Chainlink VRF

https://github.com/Trustified-Network/TN-Harmony/blob/master/src/modal/CreateInvoiceModal.js

 window.ethereum.enable();
  const provider = new ethers.providers.Web3Provider(window.ethereum);
  const signer = provider.getSigner();
  const priceFeed = new ethers.Contract(
    chainLinkPriceFeed,
    chainlinkABI,
    signer
  );
  const randomNumberCon = new ethers.Contract(
    RandomNumberGeneratorContract,
    chainlinkVRFABI.abi,
    signer
  );

 await randomNumberCon.getRandomNumber(1000);
        const randNo = await randomNumberCon.getRandom();
        setLoading(true);
        const formData = {
          invoiceNumber: parseInt(randNo._hex, 16),
          created: values.cdate,
          dueDate: values.ddate,
          description: values.description,
          quantity: values.quantity,
          price: values.price,
          token: selectedToken,
          network: values.network,
          name: values.name,
          address: values.address,
          taxName: values.taxName,
          taxPercentage: values.taxPercentage,
          note: values.note,
        };
        const files = makeFileObjects(formData);
        await storage(files, formData);

Homepage

Screenshot 2022-05-28 at 12 28 50 AM

Escrow Agreement

Screenshot 2022-06-10 at 7 07 56 PM

Login With Unstoppable, coinbase wallet, Wallet connect , Metamask

Screenshot 2022-05-28 at 12 29 01 AM

Create Agreement!

Screenshot 2022-06-10 at 7 08 55 PM

Crypto Payment

Screenshot 2022-06-10 at 7 09 12 PM

EPNS Notifications

Screenshot 2022-05-28 at 12 30 49 AM

Invoice

Screenshot 2022-06-10 at 7 09 43 PM

Invoice Details

Screenshot 2022-06-10 at 7 09 55 PM