11

How can I interact with an already deployed contract on ether(not mine) using Remix without the source code, but I have the ABI.

The reason I want to do it is because some contract has more than 20 .sol files which I dont want to manually copy and paste into Remix.

Vova
  • 143
  • 5

2 Answers2

7

Create a file with the name of the contract with .abi extension and paste the abi code inside of it. Then go to" deploy and run transaction" tap and paste the contract address in the "At Address" file and press the button to get access to the functions that the contract exposes.

SanzIv
  • 101
  • 1
  • 3
  • thank you. didn't realize it is that simple. A lot other internet posts say that you have to have original .sol file. But indeed you only need original .abi file. Some more detail, once you saved .abi file, in the Compile tab, you will see "Compile MyContract.abi" button, very assuring. – oldpride Mar 29 '23 at 22:25
1

If you have the address of where the contract is deployed, in the "deploy and run" section of the remix, click on AtAdress under the Deploy button and enter your address. It will show you the deployed contracts.

mahtab n
  • 11
  • 2