Tuesday, February 21, 2023
108/365: Contract Interfaces
Smart contracts are constantly interacting with each other. One way to achieve this is with inheritance, where your contract descends from another and can access any of the internal methods. Otherwise, to interact with another contract you first define an interface. The interface tells the compiler what functions the other contract has, along with their parameters and return types. In Solidity, you can return multiple pieces of data from one function which is somewhat strange to me. Regardless, once your interface is defined you point towards the other contract's address on the blockchain and you now have access to their public and external methods.
Subscribe to:
Post Comments (Atom)
190: Sablier
The CodeHawks platform has an upcoming audit on the Sablier protocol, so I decided to read through the docs and familiarize myself with the...
-
The CodeHawks platform has an upcoming audit on the Sablier protocol, so I decided to read through the docs and familiarize myself with the...
-
The ZKasino project recently exit scammed over 33 million dollars worth of Ethereum. he recent debacle surrounding ZKasino offers valuable...
-
In addition to its native SDK, Hedera also supports smart contracts in a platform compatible with the Ethereum Virtual Machine. This allows ...
No comments:
Post a Comment