npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sumer-protocol

v1.0.0

Published

Sumer contracts

Downloads

5

Readme

CircleCI codecov

Sumer Protocol

The Sumer Protocol is an Binance Smart Chain smart contract for supplying or borrowing assets. Through the sdrToken contracts, accounts on the blockchain supply capital (HT or HRC-20 tokens) to receive sdrTokens or borrow assets from the protocol (holding other assets as collateral). The protocol will also enable the minting of suUSD, which is the first synthetic stablecoin on Sumer that aims to be pegged to 1 USD. suUSD is minted by the same collateral that is supplied to the protocol. The Sumer sdrToken contracts track these balances and algorithmically set interest rates for borrowers.

Before getting started with this repo, please read:

Contracts

We detail a few of the core contracts in the Sumer protocol.

Installation

To run charge, pull the repository from GitHub and install its dependencies. You will need yarn or npm installed.

git clone https://github.com/dfinlab/sumer-protocol
cd charge-protocol
yarn install --lock-file # or `npm install`

REPL

The Sumer Protocol has a simple scenario evaluation tool to test and evaluate scenarios which could occur on the blockchain. This is primarily used for constructing high-level integration tests. The tool also has a REPL to interact with local the Sumer Protocol (similar to truffle console).

yarn repl -n development
yarn repl -n rinkeby

> Read SDRToken sdrBAT Address
Command: Read SDRToken sdrBAT Address
AddressV<val=0xAD53863b864AE703D31b819d29c14cDA93D7c6a6>

You can read more about the scenario runner in the Scenario Docs on steps for using the repl.

Testing

Jest contract tests are defined under the tests directory. To run the tests run:

yarn test

Integration Specs

There are additional tests under the spec/scenario folder. These are high-level integration tests based on the scenario runner depicted above. The aim of these tests is to be highly literate and have high coverage in the interaction of contracts.

Formal Verification Specs

The Sumer Protocol has a number of formal verification specifications, powered by Certik. The Certik Verification evaluates smart contracts for vulnerabilities and certifies their behavior with respect to a custom function specification.

See the Scenario Docs on steps for using the repl.

Testing

Contract tests are defined under the tests directory. To run the tests run:

yarn test

Code Coverage

To run code coverage, run:

yarn coverage

Linting

To lint the code, run:

yarn lint

Deploying a SDRToken from Source

To deploy a new sdrToken, you can run the token:deploy. command, as follows. If you set VERIFY=true, the script will verify the token on BscScan as well. The JSON here is the token config JSON, which should be specific to the token you wish to list.

npx hardhat run scripts/DeployAll.ts

_© Copyright 2024, meterio