Skip to content

Commit

Permalink
smart contract demo
Browse files Browse the repository at this point in the history
  • Loading branch information
W-B-S committed Aug 22, 2018
1 parent 3af7240 commit a2439d6
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions smartContracts/chapter5.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@ pragma experimental ABIEncoderV2;

contract Chapter5 {

function simpleStatic(uint32 x, bool y) public pure returns (bool r) {
function simpleStatic (uint32 x, bool y) public pure returns (bool r) {
r = x > 32 || y;
}

function staticArray(bytes3[2] memory b) public view {
require(msg.sender != address(this));
function staticArray(bytes3[2] memory b) public view {
require (msg. sender != address(this));
}

function simpleDynamic(bytes memory b1, bool b2, uint[] memory u1) public pure {
function simpleDynamic (bytes memory b1, bool b2, uint[] memory u1) public pure {
}

function dynamicTuple(uint256 u1, uint32[] u2, bytes10 b1, bytes b2) public payable{
require(msg.sender != address(this));
function dynamicTuple (uint u1, uint32[] u2, bytes10 b1, bytes b2) public payable {
require (msg. sender != address(this));
}

function complexDynamic(uint[][] u1, string[] s1) public pure{

function complexDynamic(uint[][] u1, string[] s1) public pure {
}
}
}

0 comments on commit a2439d6

Please sign in to comment.