Polyjuice-Orange
2020-03-01 177浏览
- 1.Polyjuice
- 2.“Polyjuice is a layer 2 solution that provides a Web3 compatible interface on top of Nervos CKB. The design goal here is 95%+ compatible with existing Ethereum solution, so that your Solidity smart contracts and tools for Ethereum could work directly on top of Nervos CKB.” –Xiaoxuejie
- 3.Benefits • A state rent model that everyone needs to pay for their own storage • An EVM that could be upgraded with new features without needing hardforks • A modern blockchain that does not suffer from Ethereum's legacies.
- 4.关公战秦琼 根据以前的理理解,CKB 和 ETH 两条链从代币模型到合约完全 不不相同: CKB 是 UTXO 模型并且每个⽤用户都需要为⾃自⼰己的存储付费; Ethereum 是 Account 模型,⽤用户的存储不不需要付费。 怎么想两条链都不不可能兼容到⼀一起好吧?
- 5.Cell Model
- 6.Lock Script 将使⽤用正常私钥解锁的Cells —> 使⽤用ETH私钥解锁的Cells
- 7.从链上获取状态 Polyjuice 通过get_live_cell 来获取 CKB 全⽹网哪些 Cells 是使 ⽤用 Ethereum 特定的 hash 的 Lock Script, 就知道全⽹网有多少 个 Cells 是以 Ethereum 的形式存在的。
- 8.Transcation ⼀一笔交易易(A->B): • 对使⽤用者来说: 是 A 的以太坊地址发送到 B 的以太坊地 址; • 对 Polyjuice 来说: 是能⽤用 A 的以太坊私钥解锁的 Cells, 转变成了了能⽤用 B 的以太坊私钥解锁的 Cells.
- 9.Contract
- 10.Contract • 合约的执⾏行行边界在哪⾥里里? • 谁可以操作合约? • …?
- 11.More • Introduction to CKB Script Programminghttps://xuejie.space/• Githubhttps://github.com/nervosnetwork/polyjuice
- 12.Thanks!