sirius
sirius copied to clipboard
Disable reading/writing contract of proxyed contract
Do you want to request a feature or report a bug?
Feature request
If this is a feature request, what is motivation or use case for changing the behavior?
Some contract uses the proxy call to make the contract upgradable. For example, a swappi contract 0xca49dbc049fca1916a1e51315b992a0d1eb308e7 (called the outer contract in the following) is simply a proxy of contract 0xdfb7a53aad99d291b09b3ecd98e89cf164836595 (called the inner contract in the following).
Currently, Conflux scan has a feature called "Read as Proxy", allowing users to access the inner ABI by the outer proxy contract. It is a useful feature.
However, if the users read and write the inner contract 0xdfb7a53aad99d291b09b3ecd98e89cf164836595 directly, it may get the false information or lost their assets.
By EVM's design, the inner contract is just a piece of code, while all the changes happen in the outer contract. However, if a user interacts with the inner contract directly, the change will happen in the inner contract.
What is the expected behavior?
If a contract is the implementation of an upgradable contract (e.g., 0xdfb7a53aad99d291b09b3ecd98e89cf164836595), ConfluxScan should not expose "read contract" and "write contract" interfaces unless in an expert mode. Or put a warning message here.