Coder Social home page Coder Social logo

jvc-byte / sui-lending-protocol Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scallop-io/sui-lending-protocol

0.0 0.0 0.0 1.06 MB

An over collateralized lending protocol on SUI network

License: Apache License 2.0

TypeScript 23.17% Move 76.83%

sui-lending-protocol's Introduction

Core of Scallop lending protocol on SUI network

How to use

  1. Install npm packages
pnpm install
  1. Install SUI cli See the official documentation: How to install SUI cli

  2. Set the envs

cp .env.example .env
  • SECRET_KEY: The secret key of the account that will be used to deploy the contracts, make sure the account has enough SUI to pay for the transaction fees
  • SUI_NETWORK_TYPE: The network type of the SUI network. It can be devnet, testnet, mainnet or localnet

Move package structure

We use typescript to publish & interact with the contracts, and we make some improvements to the package structure to make it easier to use.

Let's take the test_coin package as an example:

img.png

  • sources folder contains all the move contract code.

  • typescript folder usually contains the typescript code that will be used to deploy & interact with the contract.

  • publish-result.${networkType}.json contains the important object ids of the contracts for each network type.

  • index.ts export the typescript code in the typescript folder.

  • Move.${networkType}.toml is the toml file for each network type.

  • Move.toml is the default toml file, it will be used if the Move.${networkType}.toml for the current network type is not found.

  • README.md description of the package, explain the usage of the package.

Use Scallop SDK to interact with the contracts

It's recommended to use the Scallop SDK to interact with the contracts, see the official documentation: How to use Scallop SDK

Integrate with Scallop Protocol in SUI Move

The protocol is designed to be simple, efficient, and secure.

Moreover, the protocol is designed to be composable, meaning that other protocols can easily integrate with it.

Contract integration guide

sui-lending-protocol's People

Contributors

zengxinhai avatar nathanramli avatar shawn-xinhai avatar mr-donor avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.