我使用坚固的合同写了可升级的智能合同,并升级了几次合同。
当我升级智能合约时,更改了实施合同地址。
但是在该地址下,旧的实施合同地址仍然存在。
如何更改或隐藏此旧地址?
I wrote upgradable smart contract using solidity and upgraded contract several time.
When I upgraded smart contract, implementation contract address was changed.
But under that address, the old implementation contract address still remains.
https://rinkeby.etherscan.io/address/0x245dBBE31f33569D3d7F1e0df10c93547c44065D#readProxyContract

How to change or hide this old address?
发布评论
评论(1)
特别是一旦将任何东西存储在区块链上,就无法隐藏任何东西。旧地址仍然可以看到。
但是,如果您希望呼叫旧合同应该失败,则可以在智能合约中创建
自我毁灭
功能,并在更新智能合约并使用新地址部署它时将其调用。提示 -
自我毁灭的智能合约
功能自我破坏的语法 -
Particularly you can't hide anything once it is stored on the Blockchain. The old address will still be visible.
But if you want that calling to the old contract should fail, you can simply create a
self destruct
function inside your smart contract and call it when you have updated the smart contract and deployed it with a new address.Tip -
self destruct
functionalitySyntax for self destruct -