View agreement.sol
contract C { | |
address person1; | |
address person2; | |
bool person1Agreement = false; | |
bool person2Agreement = false; | |
function doWeAgree() constant returns (bool) { | |
if (person1Agreement == true && person2Agreement == true) | |
return true; |
View billsSolidity.sol
contract TicTacToe { | |
address player_one; | |
address player_two; | |
address public next_player; | |
address public winner; | |
mapping (uint => address) game_board; | |
uint total_moves; | |
bool public game_in_progress; | |
/// @notice Creates a tictactoe game for first player (first up) and second player |
View ValentinesDay.sol
contract owned { | |
function owned() { owner = msg.sender; } | |
address owner; | |
modifier onlyowner { if (msg.sender != owner) throw; _ } | |
} | |
contract forDiana is owned { | |
event getPoem(string indexed message); | |
string[18] poem; | |
function forDiana() { |
View SolidityNameAndTypeResolution.cpp
//These are the current name and type resolution tests and what we should be checking for whenever default arguments are invoked | |
BOOST_AUTO_TEST_CASE(default_args_calling_function) | |
{ | |
char const* text = R"( | |
contract C { | |
function def(uint x = 123, string b = "Hello") returns (uint, string, string a = "World") { | |
return (x, b, a); //maybe make it so we can leave a off? That might be getting ahead of ourselves | |
} | |
function check() { |