I am trying to understand the Zepplin proxy code pattern so i deployed two contracts using remix
Token.sol
(logic contract - basicERC20
contract)AdminUpgradeabilityProxy.sol
(From zepplin)
In the AdminUpgradeabilityProxy
the logic/implementation address is already defined as the address to Token.sol
.
Then I try to load the proxied contract instance by essentially loading the implementation contract (Logic.sol
) by using the Proxy contract (AdminUpgradeabilityProxy.sol
) address.
However, in doing so any functions i call on this proxied contract fails. What is it that I am doing wrong. Any help is appreciated.
EDIT: I have deployed PAXOS Standard token contracts on the Rinkeby network. (https://github.com/paxosglobal/pax-contracts/tree/master/contracts)
Implementation contract:
https://rinkeby.etherscan.io/address/0x075b201c705a2a49cc06c859557ccd63749ada13
Proxy Contract:
https://rinkeby.etherscan.io/address/0xef4360e5e6112e05618c98cbd74947d88139a19b
require
statement in the_willFallback()
function of theAdminUpgradeabilityProxy
contract. I don't know if it's expected behaviour or anormal. If you want to call an admin function in the ERC20 contract through the proxy, it will always fail because of therevert
. – Elisha Drion Apr 14 '19 at 13:16