3

Yesterday I was working on a contracted that I deployed.

Now I would like to access my contract on Remix by using the address, in DEPLOY AND RUN TRANSACTIONS:

  • I set Injected Web3, like I did yesterday to deploy.
  • I have my MetaMask properly set, with the same network and same address I used yesterday.
  • I added the contract address in the field: At Address, but the button stays greyed.

Do I miss something?

1 Answer 1

6

You did everything right. But before that, you'll need to open the contract in the editor and compile it. When you do that, you'll see the Contract name in the "Contract" field on the deploy page (see image). This is to let Remix know which ABI to use to interact with the contract. Once you select the right contract, then you add the deployed contract address and click "At Address" and now you'll see the available functions below.

Screenshot from Remix

4
  • So I misunderstood when I thought the smart contract could be retrieved from another computer that has not the solidity source code? Is there any way I can have the ABI, without having the source code?
    – Bebs V
    Commented Feb 2, 2022 at 14:14
  • 2
    If you had published the source code to etherscan, you can get the code and ABI from there, but apart from that, I don't think there is anything that can be done.
    – pbsh
    Commented Feb 2, 2022 at 14:18
  • If I have the source code, I can't either test the contract the same way but with a different MetaMask? I want to test my smart contract from a user point of view (different address that the one that deployed).
    – Bebs V
    Commented Feb 2, 2022 at 14:45
  • 1
    You can. You just need to select a different account in metamask
    – pbsh
    Commented Feb 2, 2022 at 15:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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