1

I am new to writing contracts so I appreciate any help you can give. I wrote a contract with Remix and then deployed it on the Rinkeby network. I have received a contract address so I know the contract is deployed. My computer then reset and now I want to gain access to the deployed contract.

I went back to remix and my contract is not there anymore. =( How do I gain access to the contract again where I can use the functions like mint, withdraw, reveal etc.

The more detailed you can be, step by step, the better it would be for me. Thank you in advanced! Have an amazing day!

-Matt

2 Answers 2

2

If you have the source code of the Smart Contract, you can follow the below-listed steps.

  1. Connect Web3 on Rinkeby network
  2. Compile your Smart Contract
  3. Go to deploy and run section in the Remix IDE
  4. Select your smart contract in the CONTRACT dropdown
  5. Under the Deploy button, you'll be able to see "At Address"

enter image description here

6. Paste your contract address (The one which you received when you deployed)

You'll be able to see the contract's methods under the "Deployed Contracts" section

2
  • Thanks for your response. 2 questions for you. When you say "Compile your smart contract," Do you create a new file on Remix that is a copy of the exact same smart contract and then click compile? If that's the case, I did that and when I put the contract address in the At address, it pulled it up but only gave me the option of low level transactions and a section that says CALLDATA. Did I maybe miss a line of code in my original contract? If so, what wording should I add to my contract I can access it like you described in the future? Thanks for your help!
    – Matt H
    Commented Jan 28, 2022 at 19:30
  • 1. You can use the same file which you used to deploy. However, if you've lost that file and have the same code stored somewhere else, you can create a new file, paste the code into the file and perform the above steps. 2. Make sure your Smart Contract file contains at least 1 external or public function. Commented Jan 31, 2022 at 12:31
0
  1. Look for your account address (Metamask I assume) that you used to deploy that contract on https://rinkeby.etherscan.io/
  2. In transactions section you will find a transaction labeled Contract creation.
  3. Click on that label and it brings you to your contract, you can find its address there.
  4. If you have the EXACT same code still on you, you can follow the steps Yash provided you with. If you don't have the same code, you're probably out of luck if you need that remix interface.

Don't worry though, you're on the right track and probably will soon switch to Visual Studio Code and learn how to interface with deployed contracts manually. It'll give you MUCH more flexibility If you want to be guided on this full journey, I suggest taking this free course.

https://www.youtube.com/watch?v=M576WGiDBdQ

It seems like a looooong video, in fact it is, but will leave you with all the basic info you NEED to have when starting solidity programming.

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.