Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Solidityの複数コントラク ト連携を色々試してる話

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.

Solidityの複数コントラク ト連携を色々試してる話

Avatar for yudetamago

yudetamago

April 10, 2018
Tweet

More Decks by yudetamago

Other Decks in Programming

Transcript

  1. ⾃⼰紹介 名前: ゆで卵 Twitter: @takayukib Github: yudetamago 所属: フリーランス •

    blockchain.tokyo #6 でもLTしてた⼈ • ブロックチェーン界隈に来たのはわりと最近(2ヶ⽉前ぐらい) • 業務でDapps作ってます 2
  2. 解決⽅法 7 Frontend Contract Backend Contract A Backend Contract B

    function A() public onlyAcceptable function B() public onlyAcceptable function useAB() Owner setAcceptable(Frontend.address) setAcceptable(Frontend.address) https://github.com/yudetamago/solidity-example/blob/master/contracts/AtomicProcess.sol
  3. 利点/⽋点 • 利点: 柔軟性 • ロジック⽤のContractをいつでも変えられる(アップグレー ド可能) • ⽋点: gasコスト上昇

    • Contractのサイズが⼤きくなるのでデプロイ時のgasが上が る • 外部Contract呼び出し(DELEGATECALL)のコストが⾼い 11