@trustline/probity v1.0.0
Probity
Probity is a protocol for asset-based lending designed to run on EVM-compatible distributed ledgers.
You can view the contract code in the contracts folder and the audit report can be found in the audits folder. You can find everything else in the protocol documentation.
Usage
This repository contains the source code for the Probity smart contract system and examples to jumpstart development with Probity. The contract ABIs are accessible through the @trustline/probity NPM package.
Installation
This project uses Node.js and assumes you have it installed.
Add @trustline/probity to your project with npm or yarn:
npm install @trustline/probity --saveExample
Below is a code snippet that shows how to import the contract ABI and call a contract method using ethers.
/**
* This example gets the total supply of the USD token by
* calling the `totalSupply` method on the ERC20 contract at
* <address>.
*/
import UsdABI from "@trustline/probity/artifacts/contracts/tokens/Usd.sol/USD.json";
import { Contract } from "ethers";
const USD_ERC20_ADDRESS = "<address>";
const usdErc20 = new Contract(
USD_ERC20_ADDRESS,
UsdABI.abi,
library.getSigner()
);
const totalSupply = await usdErc20.totalSupply();
console.log("Total supply:", totalSupply);Development
See the developer guide for details.
Deployment
See the deployment guide for details.
Administration
See the administration guide for details.