Code Monkey home page Code Monkey logo

devex-27-submission-5's Introduction

System of Smart Contracts for Recurring Payments

Code

The following directory are available:

  • contracts/ contains the main contracts RPSRoot, RPSProvider and RPSUser.

  • debot/ contains 2 debots, one for users and one for service providers.

  • report/ contains the PDF of the submission with more details

  • tests/ contains scripts to run the contracts on TONOS-SE

Tooling

To build the project, you will need to use ft, from https://github.com/OCamlPro/freeton_wallet .

Architecture

See the PDF file in report/ for a more detailed description.

SP: Service Provider RPS: Recurrent Payment System

Version 1: centralized

In this version, there are 3 contracts:

  • The RPSRoot is the central spot, it contains functions to deploy other contracts
  • The RPSProvider is the contract that manages a set of services for a given Service Provider. It contains a set of services that can be subscribed to by users, and manages these services. It also contains a set of wallets for different TIP-3 tokens. The service provider can reclaim payments from time to time.
  • The RPSUser is the contract that manages all subscriptions of a given user.

A user can subscribe to a service for a given period, sending the corresponding payment (for the full period) at the subscription time. The provider of the service can only access the part of the payment for the already started period.

A user can pause the service, starting at the next period. It can unpause the service, either for the next period (if not yet paused), or at the current time (if already paused for that time).

A user can stop the service, starting at the next period. In this case, it recovers its payment for the periods that have not been started.

devex-27-submission-5's People

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.