wamp-proto / wamp-xbr

The XBR Protocol - blockchain protocol for decentralized open data markets
https://xbr.network
Other
11 stars 16 forks source link

Upgradable smart contracts (proxy pattern) #9

Open oberstet opened 5 years ago

oberstet commented 5 years ago

We should allow to upgrade our contract logic in the field (after deployment to mainnet):

oberstet commented 5 years ago

after reviewing a couple of approaches, I think we should use OwnedUpgradeabilityProxy by OpenZeppelin. here are a couple of links:

usage works like this:

networkProxy = OwnedUpgradeabilityProxy.new({ from: owner })
networkBehavior = XBRNetwork.new()
networkProxy.upgradeTo(networkBehavior.address, { from: owner })
network = XBRNetwork.at(networkProxy.address)
oberstet commented 4 years ago
oberstet commented 4 years ago