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.

Home Page:https://ton.org/grants

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add toncoin to trust wallet core

PolyProgrammist opened this issue · comments

Summary

Integrate TON blockchain into trust wallet core. https://github.com/trustwallet/wallet-core

Context

There are 10 million downloads of trust wallet. These are the users that may be interested in toncoin, but not holding it yet. This is not the only app that uses wallet-core. Projects that are using wallet-core are trust wallet, coinpaprika, IFWallet, Alice, crypto.com, frontier, belko, pumapay. Also the project is valuable for people who hold toncoin and other cryptocurrencies, but would like to hold everything in single wallet on native blockchains.

Adding toncoin to wallet-core will enable projects that use it, integrate it faster

Goals

The problem addressed is having toncoin on different wallets used by people.
The success metric for the project is merged pull request in wallet-core repository
https://github.com/trustwallet/wallet-core

There should be ability to receive and send toncoin

Deliverables

Contribution guide to support new blockchain in trust wallet is written here
https://developer.trustwallet.com/wallet-core/newblockchain#overview
There is already an everscale support which can be used as a reference trustwallet/wallet-core#2428 However there are differences between everscale and toncoin from ton foundation as the projects develop independently.

What needs to be done:

  • Highlight common code for Ton and Everscale in a separate entity
  • Change the everscale code so that it uses the common code and makes sure everything works
  • Write code for ton
  • Check and fix the performance on the tone:
    • Parsing serialization and deserialization addresses (address.cpp)
    • Cell, cell slice, cell builder
    • Getting an address from a wallet (purse) code
    • Serialization and dereserialization of transfer messages (signer)
  • Add to registry, generate code and write for this test:
    • Add the coin definition to registry.json.
    • Execute codegen/bin/newcoin .
    • Execute tools/generate files.
    • Add a coin manager to src/Coin.cpp.
    • Create tests in the file tests/Xxx/TWCoinTypeTests.cpp.
  • Add C interface to src/interface
  • Write tests
    • Getting an address phrase from a seed
    • Mainnet signature tests
    • Tests for TWAnyAddress and TWAnySigner in the interface
    • Generate code for ios and android and crash (apparently there may be problems) and write integration tests for this code
    • Extensive tests in swift and kotlin including the files CoinAddressDerivationTests.cpp, CoinAddressValidationTests.cpp, TWHRPTests.cpp, CoinAddressDerivationTests.kt, CoinAddressDerivationTests.swift and others
  • Pass the integration tests, the code review, correct the comments and merge the pull request

Definition of Done

Reward

  • Standard Footstep NFT
  • 4250 USDT equivalent

Total: $4250

LGTM! It will definitely help the TON ecosystem to grow. A lot of people are asking about ton support in trust wallet every day and not everyone wants to download tonkeeper or tonhub.

LGTM