在合約部署之前做好遷移程序的功課。
使用事件(events)來提高數據追蹤的效率。
如果你想要部署可升級合約,那么你必須準備好遷移程序,因為你的密鑰可能會受到損害,或者你的合約可能會受到錯誤且不可逆轉的操縱。
智能合約帶來了新的開發范式——其不可變性要求用戶重新思考搭建應用的方式,并且需要更透徹全面的設計和開發過程。
正文中涉及的鏈接:
[1]:https://blog.trailofbits.com/2018/09/05/contract-upgrade-anti-patterns/
[2]:https://twitter.com/Bancor/status/1016420621666963457
[3]:https://medium.com/@kickico/kickico-security-breach-issue-under-control-all-kickcoins-will-be-returned-ebe65a491dec
[4]:https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgetstorageat
[5]:https://github.com/blockchain-etl/ethereum-etl
[6]:https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md#balanceof
[7]:https://github.com/OpenZeppelin/openzeppelin-solidity/blob/03dfb2965c6a607e216b110910f9fce1c43d8c94/contracts/token/ERC20/ERC20Pausable.sol
[8]:https://github.com/blockchain-etl/ethereum-etl
[9]:https://cloud.google.com/blog/products/data-analytics/ethereum-bigquery-public-dataset-smart-contract-analytics
[10]:https://ethgasstation.info/calculatorTxV.php
[11]:https://etherscan.io/tokens
[12]:https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md#allowance
[13]:https://medium.com/@AugurProject/deployment-details-rep-migration-e5413ff9fb65
[14]:https://medium.com/@vechainofficial/vechainthor-wallet-ama-5650dea84ccb
[15]:https://medium.com/tron-foundation/guide-to-independence-trx-token-migration-269302b6655c
[16]:https://blog.trailofbits.com/2018/09/05/contract-upgrade-anti-patterns/