|
| 1 | +module $TEST_NAME |
| 2 | + imports VERIFICATION |
| 3 | + |
| 4 | + claim |
| 5 | + |
| 6 | + <kevm> |
| 7 | + <k> #execute => #halt </k> |
| 8 | + <exit-code> 1 </exit-code> |
| 9 | + <mode> NORMAL </mode> |
| 10 | + <schedule> ISTANBUL </schedule> |
| 11 | + |
| 12 | + <ethereum> |
| 13 | + <evm> |
| 14 | + <output> _ => #buf(32, OUT_ADDR) ++ #buf(32, OUT_U16) </output> |
| 15 | + <statusCode> _ => EVMC_SUCCESS </statusCode> |
| 16 | + <endPC> _ => ?_ </endPC> |
| 17 | + <callStack> _ </callStack> |
| 18 | + <interimStates> _ </interimStates> |
| 19 | + <touchedAccounts> _ => ?_ </touchedAccounts> |
| 20 | + |
| 21 | + <callState> |
| 22 | + <program> #parseByteStack($Foo::RUNTIME) </program> |
| 23 | + <jumpDests> #computeValidJumpDests(#parseByteStack($Foo::RUNTIME)) </jumpDests> |
| 24 | + |
| 25 | + <id> ACCT_ID </id> // contract owner |
| 26 | + <caller> CALLER_ID </caller> // who called this contract; in the beginning, origin // msg.sender |
| 27 | + |
| 28 | + <callData> #abiCallData("_address_u16", #address(IN_ADDR), #uint16(IN_U16)) </callData> |
| 29 | + |
| 30 | + <callValue> 0 </callValue> |
| 31 | + <wordStack> .WordStack => ?_ </wordStack> |
| 32 | + <localMem> .Memory => ?_ </localMem> |
| 33 | + <pc> 0 => ?_ </pc> |
| 34 | + <gas> #gas(_VGAS) => ?_ </gas> |
| 35 | + <memoryUsed> 0 => ?_ </memoryUsed> |
| 36 | + <callGas> _ => ?_ </callGas> |
| 37 | + |
| 38 | + <static> false </static> // NOTE: non-static call |
| 39 | + <callDepth> CALL_DEPTH </callDepth> |
| 40 | + </callState> |
| 41 | + |
| 42 | + <substate> |
| 43 | + <selfDestruct> _ </selfDestruct> |
| 44 | + <log> _ </log> |
| 45 | + <refund> _ </refund> // TODO: more detail |
| 46 | + <accessedAccounts> _ => ?_ </accessedAccounts> |
| 47 | + <accessedStorage> _ => ?_ </accessedStorage> |
| 48 | + </substate> |
| 49 | + |
| 50 | + <gasPrice> _ </gasPrice> |
| 51 | + <origin> ORIGIN_ID </origin> // who fires tx |
| 52 | + |
| 53 | + <blockhashes> _ </blockhashes> |
| 54 | + <block> |
| 55 | + <previousHash> _ </previousHash> |
| 56 | + <ommersHash> _ </ommersHash> |
| 57 | + <coinbase> _ </coinbase> |
| 58 | + <stateRoot> _ </stateRoot> |
| 59 | + <transactionsRoot> _ </transactionsRoot> |
| 60 | + <receiptsRoot> _ </receiptsRoot> |
| 61 | + <logsBloom> _ </logsBloom> |
| 62 | + <difficulty> _ </difficulty> |
| 63 | + <number> _ </number> |
| 64 | + <gasLimit> _ </gasLimit> |
| 65 | + <gasUsed> _ </gasUsed> |
| 66 | + <timestamp> _ </timestamp> |
| 67 | + <extraData> _ </extraData> |
| 68 | + <mixHash> _ </mixHash> |
| 69 | + <blockNonce> _ </blockNonce> |
| 70 | + <ommerBlockHeaders> _ </ommerBlockHeaders> |
| 71 | + </block> |
| 72 | + </evm> |
| 73 | + |
| 74 | + <network> |
| 75 | + <chainID> _ </chainID> |
| 76 | + |
| 77 | + <activeAccounts> SetItem(ACCT_ID) _:Set </activeAccounts> |
| 78 | + |
| 79 | + <accounts> |
| 80 | + <account> |
| 81 | + <acctID> ACCT_ID </acctID> |
| 82 | + <balance> _ </balance> |
| 83 | + <code> #parseByteStack($Foo::RUNTIME) </code> |
| 84 | + <storage> _ </storage> |
| 85 | + <origStorage> _ </origStorage> |
| 86 | + <nonce> _ </nonce> |
| 87 | + </account> |
| 88 | + </accounts> |
| 89 | + |
| 90 | + <txOrder> _ </txOrder> |
| 91 | + <txPending> _ </txPending> |
| 92 | + <messages> _ </messages> |
| 93 | + </network> |
| 94 | + </ethereum> |
| 95 | + </kevm> |
| 96 | + |
| 97 | + requires 0 <=Int ACCT_ID andBool ACCT_ID <Int (2 ^Int 160) |
| 98 | + andBool 0 <=Int CALLER_ID andBool CALLER_ID <Int (2 ^Int 160) |
| 99 | + andBool 0 <=Int ORIGIN_ID andBool ORIGIN_ID <Int (2 ^Int 160) |
| 100 | + andBool 0 <=Int CALL_DEPTH andBool CALL_DEPTH <Int 1024 |
| 101 | + andBool 0 <=Int IN_ADDR andBool IN_ADDR <Int (2 ^Int 160) |
| 102 | + andBool 0 <=Int IN_U16 andBool IN_U16 <Int (2 ^Int 16) |
| 103 | + andBool IN_ADDR ==Int OUT_ADDR |
| 104 | + andBool IN_U16 ==Int OUT_U16 |
| 105 | + |
| 106 | +endmodule |
| 107 | + |
0 commit comments