current position:Home>How does Ethereum call deployed contracts within a contract?

How does Ethereum call deployed contracts within a contract?

2022-02-03 23:13:31 Q & A of Denglian community

I want to create a new contract , Enable him to interact with deployed contracts , I don't know what to do . I read the official document ABI part , It just didn't give a specific case , Please give me a specific application case , thank you !




Take the answer 1:

ABI When interacting with the contract outside the contract Need to use , Contract to contract interaction does not require .

The interface is used here , such as :

interface IToken {     function transfer(address to, uint value) external returns (bool);}contract A {    function testTransfer(IToken token, address to, uint value) external {        token. transfer(to, value);       }}



copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.
https://en.netfreeman.com/2022/02/202202032313293220.html

Random recommended