ton-society / grants-and-bounties

TON Foundation invites talent to imagine and realize projects that have the potential to integrate with the daily lives of users.
https://ton.org/grants
285 stars 129 forks source link

Tonpy: lite-client, func, merkle #325

Open tvorogme opened 11 months ago

tvorogme commented 11 months ago

Summary

In the previous version of Tonpy we focused on the basic types, TLB and package delivery.

In the new version we want to provide examples of how to use this package to work with TON. First of all we want to focus on tests, deployment and interaction with smart contracts. Secondly, we want to focus on parsing blocks from the network via LiteClient.

In order to simplify the interaction with tonpy we want to provide some working examples which will include emulation, state management, working with TLB smart contracts, etc.

Context

Full plan

Our work plan for this phase:

  1. Support Merkle for Cells (for block parse&update from LS, RLDP in future)
    • MerkleProof
    • MerkleUpdate
  2. Func compiler (for compiling smart contracts)
    • Support of diffrent flags
    • Some simple tests on hash of existing contracts
    • Step-by-step run
    • Linking to func source
  3. Lite client
    • Support of TL methods of lite_client.tl
    • Support of results as tonpy objects (Cells, CellSlice, etc.)
  4. TON Keys support
    • Mnemonic
    • Ed25519
  5. TON Smart-contract address support

Light plan

  1. Func compiler
    • Support of diffrent flags
    • Some simple tests on hash of existing contracts
    • Step-by-step run
    • Linking to func source
  2. Lite-client (but not all requests, only sendMessage / getAccountState)

Estimate suggested reward

Full plan:

Light plan:

Naltox commented 11 months ago

Hey, @tvorogme we actually started working on sandbox/blueprint alternative for Python internally in TonTech. We're gonna use tonpy internally as a low-level library for ton primitives, so maybe you guys should focus on 1 - 4 points of this footstep?

tvorogme commented 11 months ago

@Naltox sure, why not.

Also, if you don't mind, our team we'd like to participate in testing/discussing of state management part.

I've updated issue according your feedback.

Naltox commented 11 months ago

Lets go with the full plan!