Skip to content

Instantly share code, notes, and snippets.

View renchuqiao's full-sized avatar

Chuqiao renchuqiao

  • NorCal
View GitHub Profile
### Keybase proof
I hereby claim:
* I am renchuqiao on github.
* I am chuqiao (https://keybase.io/chuqiao) on keybase.
* I have a public key ASDrighlomzOvVFNO-J7A20mxxUmC6g8lBAh1CDhTWjv7wo
To claim this, I am signing this object:
### Keybase proof
I hereby claim:
* I am renchuqiao on github.
* I am chuqiao (https://keybase.io/chuqiao) on keybase.
* I have a public key ASB1f4L1I8-8NzdF1Zd5-aDqsu2FSqKgB52nISJdI6O4Sgo
To claim this, I am signing this object:
@renchuqiao
renchuqiao / gist:faf57c397f4d5ff2a7f67097ffe8bf83
Created October 17, 2018 04:48
ERC54 Upgradable Smart Contract
pragma solidity ^0.4.0;
import './SafeMath.sol';
/**
* Here is an example of upgradable contract, consisting of three parts:
* - Data contract keeps the resources (data) and is controlled by Handlers;
* - Handler contract (implements Handler interface) defines operations and provide services. This contract can be upgraded;
* - Upgrader contract deals with the voting mechanism and upgrades the Handler contract. The voters are pre-defined by
* the contract owner.