November 2018
Intermediate to advanced
528 pages
13h 21m
English
As we did in the Ctontine contract, the regular way to interact with other contracts is to call (invoke) a function on a contract object (we borrow here the OOP terminology). For example, we can call a remote function from a remote contract, ContractA , as follows: ContractA.Remotefunction(arguments).
But to be able to make the invocation this way, we need to define (in the same Solidity file) an abstract form of ContractA. For instance, if we have a contract, ContractA, then the code is as follows:
contract ContractA { function f(uint256 a, string s) payable returns (bool) { //your code here return true; }}If this contract is deployed in the blockchain, let’s say under the 0x123456 address, and we want to call ...
Read now
Unlock full access