ecadlabs / taquito

A library for building dApps on the Tezos Blockchain - JavaScript / TypeScript
https://taquito.io
Apache License 2.0
298 stars 116 forks source link

Exploration: transfer ticket on the layer 2 and back to layer 1 #1684

Closed roxaneletourneau closed 2 years ago

roxaneletourneau commented 2 years ago

Hey team! Please add your planning poker estimate with ZenHub @dsawali @zainen

dsawali commented 2 years ago

Have been continuously trying to go through this documentation for TORU using various testnets and methodologies (locally built client, Docker container)

Currently consulting protocol team to test on Dailynet and am reaching out to an individual from Functori that was successful in transferring tickets from L2 to L1.

dsawali commented 2 years ago

After consulting with the protocol team, we were able to successfully withdraw tickets from L2 to L1. The process had been documented here

dsawali commented 2 years ago

To further support TORU we consulted Thomas from the protocol team again to give us a crash course on transferring/withdrawing tickets in L2 via the RPC.

The main concern now is to craft the transaction, which is a list of operations in L2 that can be either a withdrawal or a transfer.

Some relevant links to help out with implementing in Taquito:

Endpoint in L2 to facilitate operation injection is defined as follows: https://gitlab.com/tezos/tezos/-/blob/master/src/proto_013_PtJakart/lib_tx_rollup/RPC.ml#L656

Note that before we are able to withdraw/transfer tickets we need to deposit them first. Depositing can be done by calling a smart contract that deposits tickets to an L2 address. See https://gitlab.com/tezos/tezos/-/blob/master/tezt/tests/contracts/proto_alpha/tx_rollup_deposit.tz