pragma solidity ^0.5.11; contract A { address addressB; function setAddressB(address _addressB) external { addressB = _addressB; } function callHelloWorld() external view returns(string memory) { B b = B(addressB); return b.helloWorld(); } } contract B { function helloWorld() external pure returns(string memory) { return 'HelloWorld'; } } contract MyContract { uint a; function foo() external { if(a == 10) { revert('error'); } require(a != 10, 'err'); assert(a != 10); } function willThrow() external { require(true == false, 'the reasons'); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter