How to use other deployed contracts?

Hey I am dev and enthusiast. Trying to build some app on fuel, but reading docs didnt make it clear.
How can I use contracts that were deployed not by me, I need abi or bin file, but cant get them for contracts builded not by me ( fe on evm, I can find abi of verified contracts, or if I know the fuinction I can write my own abi for it) but here it needs not just abi but bin file. Can you help me make it clear please, thx

Hi jetrix,

If you want to interact with an already-deployed contract, then you don’t need the binary, only the contract’s id and its abi:

 const contract = new Contract(contractId, contractAbi, walletOrProvider);
4 Likes

But how to get the abi of deployed contract?
If I only know its ID

Hey @jetrix the short answer is no, you would need the original contract code provided by the original developers.

I believe this is on the roadmap for the block explorer, but I’m afraid it has not been prioritised yet.