TonTech take-home assignment
Narek @ TonTechHi! We glad you wan't to join TonTech!
As a part of your application process we'd like to see what you are capable of by giving you small TON-related task.
Problem description
We wan't you to develop smart-contract for TON for safe peer-to-peer purchasing.
There is three main characters:
- Seller
- Buyer
- Guarantor - (deal guarantor, usually it's the platform in which sales are made represented by server)
Suggested flow:
- Buyer deploys smart contract with desired amount of TON coins
- Guarantor checks if everything is OK (both onchain & offchain)
- If everything is OK - guarantor send's special signed message to contract & contract sends coins to seller
- If something goes wrong - guarantor send's special signed message to contract & contract returns coins to buyer
Technical requirements
- contract should be written in FunC language
- all companion code should be written in TypeScript
- contract is one time, it's deployed per sale
- contract should support royalties for Guarantor
- as an application of that contract we suggest to write small demo-app (web/tg bot/cli) that uses your contract
What do we pay attention to
- production readiness of the solution
- tests
- corner cases
- additional features/mechanics
Useful links
- Docs - https://ton.org/docs/
- TON library for JS/TS - http://github.com/tonwhales/ton/
- Tool for local debugging contracts - http://github.com/Naltox/ton-contract-executor
- Some contracts examples - http://github.com/getgems-io/nft-contracts