Code Monkey home page Code Monkey logo

contracts's Introduction

tonsub

Project structure

  • contracts - source code of all the smart contracts of the project and their dependencies.
  • wrappers - wrapper classes (implementing Contract from ton-core) for the contracts, including any [de]serialization primitives and compilation functions.
  • tests - tests for the contracts.
  • scripts - scripts used by the project, mainly the deployment scripts.

How to use

Build

npx blueprint build or yarn blueprint build

Test

npx blueprint test or yarn blueprint test

Deploy or run another script

npx blueprint run or yarn blueprint run

Add a new contract

npx blueprint create ContractName or yarn blueprint create ContractName

contracts's People

Contributors

pourian avatar

Stargazers

 avatar

Watchers

 avatar

contracts's Issues

Implement Subscription Smart Contract

Description:

We need to develop a smart contract that manages subscriptions. Below are the requirements:

Specifications:

  1. Language: The contract must be written in the TACT language.

  2. Functionality: The contract should support the following functionalities:

    • Sending a red flag to its App subscription collection contract. Each subscription can only send this once.
    • Sending a rate to its App subscription collection contract. Each subscription can only send this once.
    • Renewing a subscription:
      • The contract should be able to receive a renewal request message from its owner.
      • Upon receiving the renewal request, the contract should forward this request to its associated App subscription collection contract.
      • The contract should be capable of receiving a response message from the App subscription collection contract, which provides updates to:
        • Expiration date
        • List of access points
        • List of binded IDs
    • Retrieving subscription information, including:
      • Image
      • Expiration date
      • List of access points
      • List of IDs
  3. Conditions:

    • Only active subscriptions (those with an expiration date in the future) can send a red flag and rate.
  4. Standards: The contract must adhere to the NFT standard as defined in the TON blockchain TEPs repository.

Testing:

  • Ensure comprehensive test coverage for all functionalities mentioned above.

Implement App Collection Contract

Is your feature request related to a problem? Please describe.
There is a need for a system to manage the minting of subscription collection contracts, collect protocol fees, and make decisions on releasing or blocking frozen apps. This would be a critical component of the Decentralized Subscription Protocol.

Describe the solution you'd like
I'd like to implement the "Protocol App Collection Contract". This contract should:

  • Mint subscription collection contracts.
  • Collect protocol fees.
  • Have functions to release or block frozen apps based on certain conditions (like if over 30% of active subscriptions send a red flag).

Describe alternatives you've considered
While the decentralized architecture of our system requires such a contract, one potential alternative could have been a more centralized approach. However, this would not align with our objective of ensuring anonymity, security, and upholding the principles of decentralization.

Additional context
The "Protocol App Collection Contract" is a core part of our system architecture, interacting directly with the "Subscription Collection Contract". It plays a crucial role in maintaining the integrity and efficiency of the entire Decentralized Subscription Protocol. Implementing this with care and thorough testing is crucial for the success of our project.

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.