0

I have the following two contracts

contract MyNFT is ERC721Upgradeable, OwnableUpgradeable {
  function initialize() initializer public {
    __ERC721_init_unchained("My NFT", "MNF");
    __Ownable_init_unchained();
  }
}

contract MyUSD is ERC20Upgradeable, OwnableUpgradeable {
  address constant ADDRESS_MYNFT = ???;
  MyNFT myNFT;
  function initialize() initializer public {
    __ERC20_init_unchained("My USD", "USD");
    __Ownable_init_unchained();
    myNFT = MyNFT(ADDRESS_MYNFT);
  }
}

How can I obtain the address of the implementation contract MyNFT from the proxy in the smart contract MyUSD?

0

myNFT = MyNFT(ADDRESS_MYNFT);

ADDRESS_MYNFT is the address of the proxy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.