Skip to content

Instantly share code, notes, and snippets.

@FottyM
Created May 17, 2017 13:08
Show Gist options
  • Save FottyM/6b8d46ba2f9fae2ea345c4cff164dbc5 to your computer and use it in GitHub Desktop.
Save FottyM/6b8d46ba2f9fae2ea345c4cff164dbc5 to your computer and use it in GitHub Desktop.
contract Process_0g28l4d_Contract {
uint tokens = 1;
uint subprocesses = 0;
uint hours_before_checking_72_time = 0;
uint Checkout_date_time = 0;
function hours_before_checking_72(uint localTokens) internal returns (uint) {
hours_before_checking_72_time = now;
return localTokens & uint(~2) | 4;
}
function Owner_violation() returns (bool) {
uint localTokens = tokens;
if (localTokens & 296 != 296)
return false;
if (now >= 4 seconds + Checkout_date_time )
return false;
step( localTokens & uint(~296) | 64 );
return true;
}
function Ended_Violation_by_owner() returns (bool) {
uint localTokens = tokens;
if (localTokens & 64 != 64)
return false;
step( localTokens & uint(~64) | 0 );
return true;
}
function Checked_out() returns (bool) {
uint localTokens = tokens;
if (localTokens & 128 != 128)
return false;
step( localTokens & uint(~128) | 0 );
return true;
}
function Ended_Violation_by_user() returns (bool) {
uint localTokens = tokens;
if (localTokens & 512 != 512)
return false;
step( localTokens & uint(~512) | 0 );
return true;
}
function Checkout_date(uint localTokens) internal returns (uint) {
Checkout_date_time = now;
return localTokens & uint(~16) | 256;
}
function User_violation() returns (bool) {
uint localTokens = tokens;
if (localTokens & 296 != 296)
return false;
if (now >= 4 seconds + Checkout_date_time )
return false;
step( localTokens & uint(~296) | 512 );
return true;
}
function Cancelation_by_owner_c() returns (bool) {
uint localTokens = tokens;
if (localTokens & 2048 != 2048)
return false;
step( localTokens & uint(~2048) | 0 );
return true;
}
function Cancelation_by_user_c() returns (bool) {
uint localTokens = tokens;
if (localTokens & 8192 != 8192)
return false;
step( localTokens & uint(~8192) | 0 );
return true;
}
function Cancelation_by_owner_b() returns (bool) {
uint localTokens = tokens;
if (localTokens & 5124 != 5124)
return false;
if (now >= 3 seconds + hours_before_checking_72_time )
return false;
step( localTokens & uint(~5124) | 2048 );
return true;
}
function Cancelation_by_user_b() returns (bool) {
uint localTokens = tokens;
if (localTokens & 5124 != 5124)
return false;
if (now >= 3 seconds + hours_before_checking_72_time )
return false;
step( localTokens & uint(~5124) | 8192 );
return true;
}
function A() returns (bool) {
uint localTokens = tokens;
if (localTokens & 32768 != 32768)
return false;
step( localTokens & uint(~32768) | 65536 );
return true;
}
function Contract_created() returns (bool) {
uint localTokens = tokens;
if (localTokens & 1 != 1)
return false;
step( localTokens & uint(~1) | 32768 );
return true;
}
function C() returns (bool) {
uint localTokens = tokens;
if (localTokens & 65536 != 65536)
return false;
step( localTokens & uint(~65536) | 16384 );
return true;
}
function J() returns (bool) {
uint localTokens = tokens;
if (localTokens & 296 != 296)
return false;
if (now < 4 seconds + Checkout_date_time )
return false;
step( localTokens & uint(~296) | 128 );
return true;
}
function D() returns (bool) {
uint localTokens = tokens;
if (localTokens & 5124 != 5124)
return false;
if (now < 3 seconds + hours_before_checking_72_time )
return false;
step( localTokens & uint(~5124) | 131072 );
return true;
}
function step(uint localTokens) internal {
bool done = false;
while (!done) {
if (localTokens & 2 != 0) {
localTokens = hours_before_checking_72(localTokens);
continue;
}
if (localTokens & 131072 != 0) {
localTokens = localTokens & uint(~131072) | 56 ;
continue;
}
if (localTokens & 16 != 0) {
localTokens = Checkout_date(localTokens);
continue;
}
if (localTokens & 16384 != 0) {
localTokens = localTokens & uint(~16384) | 5122 ;
continue;
}
done = true;
}
tokens = localTokens;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment