You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the example code, wouldn't HelloWorldInterface need to be imported in some way and/or have a contract address for it to be imported into our contract?
Hello @Booker-CU
Thanks for the question.
Interfaces can be either imported from another file or defined at the same file where the other(s) contract(s) is(are).
As for the usage, it could be inherited by other contracts and even interfaces, or it could be used to define a contract interface for an address and allow external calls for it.
In the example code, wouldn't HelloWorldInterface need to be imported in some way and/or have a contract address for it to be imported into our contract?
Like for Chainlink you have to import their interface at the top and then create an instance of their interface inside the contract.
https://docs.chain.link/docs/consuming-data-feeds/
Are there different ways to code interfaces?
thx
The text was updated successfully, but these errors were encountered: