Tagged in

Truffle

Taipei Ethereum Meetup
Taipei Ethereum Meetup
台北以太坊社群專欄
More information
Followers
4.3K
Elsewhere
More, on Medium

Upgradable Smart Contracts using zos

smart contract跟一般程式最大的差異,就是smart contract上了鏈就不能改了(這是區塊鏈的特性也是優點,但是如果真的有bug,麻煩就大了…)。所以今天要介紹的是,如何用ZeppelinOS來實作upgradeable smart contract,可升級的smart contract。

OpenZeppelin對smart contract的開發者一定不陌生,提供相當多smart contract的範例程式。Zeppelin部落格有介紹如何使用proxy…


使用Truffle作smart contract測試及debug — II 測試

版本 — truffle 4.1.11
 
 延續上篇
,繼續講測試的部分
 寫test case有兩個方式,一個是用solidity另一個是用javascript,官方文件寫得還滿清楚的。記得你寫的test case的檔案,要放在test/下
 
先介紹solidity的寫法,要先import下面這兩個smart contract,當然也要記得import你自己的smart contract