Cyfrin / solidity-by-example.github.io

Solidity By Example
https://solidity-by-example.org/
MIT License
605 stars 191 forks source link

Calling Other Contract with interface #246

Closed ghost closed 1 year ago

t4sk commented 1 year ago

Relevant PR https://github.com/solidity-by-example/solidity-by-example.github.io/pull/247

t4sk commented 1 year ago

I think it's easier to understand if the interface is defined inside the current example.

contract Callee {
 // code
}

// Define interface if code of callee is not available or not needed
interface ICallee {
}

contract Caller {
 // code
}