Hi I just found that remix added "Load contract from address
" option. So I tried to load contract from address "0x67601d7a7cbbD77368785122c508503f168B1dAa
" . You can see this contract is in function in https://www.stateofthedapps.com/dapps/cute-kitty-farm . I connected to main network using meta mask
but it is not loading any contract. Instead it just deploys my own contract. How can I load contract from this address? Thank you.
Add a comment
|
1 Answer
This process works as follows:
- You must compile the same exact code that the contract you are trying to load.
- Once the compile succeeds, you have to be on the same network that the contract is, by setting your MetaMask account propperly.
- The last thing to do is paste the contract address on the option:
Load from address:
and you'll get it on remix to interact with it.
I've seen that you're doing that on the main net. If you want to test things like that i highly recommend you to search for the same contract on a testnet and then, try to load it. Cause if you deploy by error on the main net, the joke will cost you real money.
Hope it helps.
-
5So I need to have exact same of the contract. I thought it will show just the output of compiled contract. Thank you for your help.– e.kCommented May 24, 2018 at 10:58
-
1
-
1Connecting to the same network is necessary to load the contract. I think compiling the same contract is needed to get the ABI. Accessing a deployed contract requires Address and ABI. Commented Jul 22, 2022 at 0:27