Browse Source

Check State

stSolidityTest
cl-refactor
winsvega 10 years ago
parent
commit
b8301441bd
  1. 168
      test/stSolidityTestFiller.json

168
test/stSolidityTestFiller.json

@ -8,15 +8,24 @@
"currentTimestamp" : 1,
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
"storage" : {
"0x" : "0x01"
}
}
},
"pre" :
{
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
"balance" : "100000",
"//" : "contract main ",
"//" : "{ ",
"//" : " bool returnValue; ",
"//" : " function run() returns (bool) ",
"//" : " { ",
"//" : " return testCryptographicFunctions(); ",
"//" : " returnValue = testCryptographicFunctions(); ",
"//" : " return returnValue; ",
"//" : " } ",
"//" : " ",
"//" : " function testCryptographicFunctions() returns (bool res) ",
@ -34,7 +43,7 @@
"//" : " //ecrecover ",
"//" : " } ",
"//" : "} ",
"code" : "0x60003560e060020a90048063c040622614610021578063e0a9fd281461003357005b610029610045565b8060005260206000f35b61003b610054565b8060005260206000f35b600061004f610054565b905090565b60006001905060007f74657374737472696e67000000000000000000000000000000000000000000008152600a017f030d40000000000000000000000000000000000000000000000000000000000081526003016000207f43c4b4524adb81e4e9a5c4648a98e9d320e3908ac5b6c889144b642cd08ae16d14156100d7576100e0565b60009050610218565b60026020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a017f030d4000000000000000000000000000000000000000000000000000000000008152600301600060008560325a03f161014457005b506000517f3c8727e019a42b444667a587b6001251becadabbb36bfed8087a92c18882d11114156101745761017d565b60009050610218565b60036020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a017f030d4000000000000000000000000000000000000000000000000000000000008152600301600060008560325a03f16101e157005b50600051600160a060020a031673cd566972b5e50104011a92b59fa8e0b1234851ae141561020e57610217565b60009050610218565b5b9056",
"code" : "0x7c01000000000000000000000000000000000000000000000000000000006000350463c04062268114610039578063e0a9fd281461004b57005b61004161005d565b8060005260206000f35b61005361008c565b8060005260206000f35b600061006761008c565b600060006101000a81548160ff0219169083021790555060ff60016000540416905090565b600160007f74657374737472696e67000000000000000000000000000000000000000000008152600a016000207f43c4b4524adb81e4e9a5c4648a98e9d320e3908ac5b6c889144b642cd08ae16d14156100e5576100ed565b5060006101da565b60026020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a01600060008560325a03f161012b57005b507f3c8727e019a42b444667a587b6001251becadabbb36bfed8087a92c18882d111600051141561015b57610163565b5060006101da565b60036020600060007f74657374737472696e67000000000000000000000000000000000000000000008152600a01600060008560325a03f16101a157005b507fcd566972b5e50104011a92b59fa8e0b1234851ae00000000000000000000000060005114156101d1576101d9565b5060006101da565b5b9056",
"nonce" : "0",
"storage" : {
}
@ -48,7 +57,7 @@
},
"transaction" :
{
"//" : "run()",
"data" : "run()",
"data" : "0xc0406226",
"gasLimit" : "35000000",
"gasPrice" : "1",
@ -68,6 +77,18 @@
"currentTimestamp" : 1,
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
"storage" : {
"0x" : "0x01",
"0x01" : "0xff",
"0x02" : "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"0x03" : "0xff",
"0x04" : "0x676c6f62616c2064617461203332206c656e67746820737472696e6700000000",
"0x05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc" : "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b"
}
}
},
"pre" :
{
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
@ -78,10 +99,11 @@
"//" : " { ",
"//" : " address addr; ",
"//" : " int amount; ",
"//" : " string32 str; ",
"//" : " bytes32 str; ",
"//" : " mapping (uint => address) funders; ",
"//" : " } ",
"//" : " ",
"//" : " bool returnValue; ",
"//" : " int globalValue; ",
"//" : " StructTest globalData; ",
"//" : " function run() returns (bool) ",
@ -91,7 +113,8 @@
"//" : " globalData.amount = 255; ",
"//" : " globalData.str = 'global data 32 length string'; ",
"//" : " globalData.funders[0] = 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b; ",
"//" : " return testStructuresAndVariabless(); ",
"//" : " returnValue = testStructuresAndVariabless(); ",
"//" : " return returnValue; ",
"//" : " } ",
"//" : " ",
"//" : " function testStructuresAndVariabless() returns (bool res) ",
@ -113,7 +136,7 @@
"//" : " return false; ",
"//" : " } ",
"//" : "} ",
"code" : "0x60003560e060020a900480632a9afb8314610021578063c04062261461003357005b610029610045565b8060005260206000f35b61003b610136565b8060005260206000f35b60006001905060005460ff141561005b57610064565b60009050610133565b60025460005414156100755761007e565b60009050610133565b600154600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b14156100aa576100b3565b60009050610133565b6003547f676c6f62616c2064617461203332206c656e67746820737472696e670000000014156100e2576100eb565b60009050610133565b600460006000815260200190815260200160002054600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b141561012957610132565b60009050610133565b5b90565b600060ff60008190555073a94f5374fce5edbc8e2a8697c15331677e6ebf0b60018190555060ff6002819055507f676c6f62616c2064617461203332206c656e67746820737472696e670000000060038190555073a94f5374fce5edbc8e2a8697c15331677e6ebf0b6004600060008152602001908152602001600020819055506101bf610045565b90509056",
"code" : "0x7c010000000000000000000000000000000000000000000000000000000060003504632a9afb838114610039578063c04062261461004b57005b61004161005d565b8060005260206000f35b61005361016c565b8060005260206000f35b600160ff8154141561006e57610076565b506000610169565b60015460035414156100875761008f565b506000610169565b73a94f5374fce5edbc8e2a8697c15331677e6ebf0b73ffffffffffffffffffffffffffffffffffffffff60016002540481161614156100cd576100d5565b506000610169565b7f676c6f62616c2064617461203332206c656e67746820737472696e670000000060045414156101045761010c565b506000610169565b6005600080815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673a94f5374fce5edbc8e2a8697c15331677e6ebf0b141561016057610168565b506000610169565b5b90565b600060ff806001555073a94f5374fce5edbc8e2a8697c15331677e6ebf0b6002805473ffffffffffffffffffffffffffffffffffffffff1916821790555060ff80600355507f676c6f62616c2064617461203332206c656e67746820737472696e6700000000806004555073a94f5374fce5edbc8e2a8697c15331677e6ebf0b6005600080815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555061022f61005d565b600060006101000a81548160ff0219169083021790555060ff6001600054041690509056",
"nonce" : "0",
"storage" : {
}
@ -127,7 +150,7 @@
},
"transaction" :
{
"//" : "run()",
"data" : "run()",
"data" : "0xc0406226",
"gasLimit" : "350000",
"gasPrice" : "1",
@ -147,15 +170,24 @@
"currentTimestamp" : 1,
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
"storage" : {
"0x" : "0x01"
}
}
},
"pre" :
{
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
"balance" : "100000",
"//" : "contract main ",
"//" : "{ ",
"//" : " bool returnValue; ",
"//" : " function run() returns (bool) ",
"//" : " { ",
"//" : " return testBlockAndTransactionProperties(); ",
"//" : " returnValue = testBlockAndTransactionProperties(); ",
"//" : " return returnValue; ",
"//" : " } ",
"//" : " ",
"//" : " function testBlockAndTransactionProperties() returns (bool res) ",
@ -192,7 +224,7 @@
"//" : " ",
"//" : " } ",
"//" : "} ",
"code" : "0x60003560e060020a90048063c040622614610021578063e97384dc1461003357005b610029610045565b8060005260206000f35b61003b610054565b8060005260206000f35b600061004f610054565b905090565b60006001905041600160a060020a0316732adc25665018aa1fe0e6bc666dac8fc2697ff9ba14156100845761008d565b60009050610172565b446302b8feb0141561009e576100a7565b60009050610172565b45683635c9adc5dea0000014156100bd576100c6565b60009050610172565b43607814156100d4576100dd565b60009050610172565b33600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b141561010757610110565b60009050610172565b346064141561011e57610127565b60009050610172565b3a600114156101355761013e565b60009050610172565b32600160a060020a031673a94f5374fce5edbc8e2a8697c15331677e6ebf0b141561016857610171565b60009050610172565b5b9056",
"code" : "0x7c01000000000000000000000000000000000000000000000000000000006000350463c04062268114610039578063e97384dc1461004b57005b61004161005d565b8060005260206000f35b61005361008c565b8060005260206000f35b600061006761008c565b600060006101000a81548160ff0219169083021790555060ff60016000540416905090565b6001732adc25665018aa1fe0e6bc666dac8fc2697ff9ba73ffffffffffffffffffffffffffffffffffffffff411614156100c5576100cd565b5060006101c7565b446302b8feb014156100de576100e6565b5060006101c7565b45683635c9adc5dea0000014156100fc57610104565b5060006101c7565b43607814156101125761011a565b5060006101c7565b5a503373ffffffffffffffffffffffffffffffffffffffff1673a94f5374fce5edbc8e2a8697c15331677e6ebf0b14156101535761015b565b5060006101c7565b346064141561016957610171565b5060006101c7565b3a6001141561017f57610187565b5060006101c7565b3273ffffffffffffffffffffffffffffffffffffffff1673a94f5374fce5edbc8e2a8697c15331677e6ebf0b14156101be576101c6565b5060006101c7565b5b9056",
"nonce" : "0",
"storage" : {
}
@ -226,6 +258,14 @@
"currentTimestamp" : 1,
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
"nonce" : "1",
"storage" : {
"0x" : "0x01"
}
}
},
"pre" :
{
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
@ -244,9 +284,11 @@
"//": "} ",
"//": "contract main ",
"//": "{ ",
"//": " bool returnValue; ",
"//": " function run() returns (bool) ",
"//": " { ",
"//": " return testContractSuicide(); ",
"//": " returnValue = testContractSuicide(); ",
"//": " return returnValue; ",
"//": " } ",
"//": " ",
"//": " function testContractSuicide() returns (bool res) ",
@ -258,7 +300,7 @@
"//": " return false; ",
"//": " } ",
"//": "} ",
"code" : "0x60003560e060020a90048063a60eedda14610021578063c04062261461003357005b610029610045565b8060005260206000f35b61003b6100eb565b8060005260206000f35b6000600060606100fb600039606060006000f0905080600160a060020a031662f55d9d600060008260e060020a02600052600441600160a060020a03168152602001600060008660325a03f161009757005b505080600160a060020a031663b9c3d0a5602060008260e060020a026000526004600060008660325a03f16100c857005b505060005160e1146100d9576100e2565b600191506100e7565b600091505b5090565b60006100f5610045565b9050905600605480600c6000396000f30060003560e060020a90048062f55d9d14601e578063b9c3d0a514602d57005b60276004356046565b60006000f35b6033603d565b8060005260206000f35b600060e1905090565b80600160a060020a0316ff5056",
"code" : "0x7c01000000000000000000000000000000000000000000000000000000006000350463a60eedda8114610039578063c04062261461004b57005b61004161005d565b8060005260206000f35b61005361015a565b8060005260206000f35b60006000608161018a600039608160006000f0905073ffffffffffffffffffffffffffffffffffffffff811662f55d9d6000807ef55d9d00000000000000000000000000000000000000000000000000000000825260044173ffffffffffffffffffffffffffffffffffffffff168152602001600060008660325a03f16100e057005b505073ffffffffffffffffffffffffffffffffffffffff811663b9c3d0a5602060007fb9c3d0a50000000000000000000000000000000000000000000000000000000081526004600060008660325a03f161013757005b505060005160e11461014857610151565b60019150610156565b600091505b5090565b600061016461005d565b600060006101000a81548160ff0219169083021790555060ff600160005404169050905600607580600c6000396000f3007c01000000000000000000000000000000000000000000000000000000006000350462f55d9d81146036578063b9c3d0a514604557005b603f600435605a565b60006000f35b604b6055565b8060005260206000f35b60e190565b8073ffffffffffffffffffffffffffffffffffffffff16ff5056",
"nonce" : "0",
"storage" : {
}
@ -292,6 +334,14 @@
"currentTimestamp" : 1,
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
"nonce" : "1",
"storage" : {
"0x" : "0x01"
}
}
},
"pre" :
{
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
@ -310,9 +360,11 @@
"//": "} ",
"//": "contract main ",
"//": "{ ",
"//": " bool returnValue; ",
"//": " function run() returns (bool) ",
"//": " { ",
"//": " return testContractInteraction(); ",
"//": " returnValue = testContractInteraction(); ",
"//": " return returnValue; ",
"//": " } ",
"//": " ",
"//" : " function testContractInteraction() returns (bool res) ",
@ -323,7 +375,7 @@
"//" : " return false; ",
"//" : " } ",
"//": "} ",
"code" : "0x60003560e060020a90048063c040622614610021578063ed973fe91461003357005b6100296100ac565b8060005260206000f35b61003b610045565b8060005260206000f35b6000600060606100bc600039606060006000f0905080600160a060020a031663b9c3d0a5602060008260e060020a026000526004600060008660325a03f161008957005b505060005160e11461009a576100a3565b600191506100a8565b600091505b5090565b60006100b6610045565b9050905600605480600c6000396000f30060003560e060020a90048062f55d9d14601e578063b9c3d0a514602d57005b6027600435603d565b60006000f35b6033604b565b8060005260206000f35b80600160a060020a0316ff50565b600060e190509056",
"code" : "0x7c01000000000000000000000000000000000000000000000000000000006000350463c04062268114610039578063ed973fe91461004b57005b6100416100ea565b8060005260206000f35b61005361005d565b8060005260206000f35b60006000608161011a600039608160006000f0905073ffffffffffffffffffffffffffffffffffffffff811663b9c3d0a5602060007fb9c3d0a50000000000000000000000000000000000000000000000000000000081526004600060008660325a03f16100c757005b505060005160e1146100d8576100e1565b600191506100e6565b600091505b5090565b60006100f461005d565b600060006101000a81548160ff0219169083021790555060ff600160005404169050905600607580600c6000396000f3007c01000000000000000000000000000000000000000000000000000000006000350462f55d9d81146036578063b9c3d0a514604557005b603f6004356055565b60006000f35b604b6070565b8060005260206000f35b8073ffffffffffffffffffffffffffffffffffffffff16ff50565b60e19056",
"nonce" : "0",
"storage" : {
}
@ -357,15 +409,24 @@
"currentTimestamp" : 1,
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
"storage" : {
"0x" : "0x01"
}
}
},
"pre" :
{
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
"balance" : "100000",
"//": "contract main ",
"//": "{ ",
"//": " bool returnValue; ",
"//": " function run() returns (bool) ",
"//": " { ",
"//": " return testKeywords(); ",
"//": " returnValue = testKeywords(); ",
"//": " return returnValue; ",
"//": " } ",
"//": " ",
"//": " function testKeywords() returns (bool res) ",
@ -402,7 +463,7 @@
"//": " return false; ",
"//": " } ",
"//": "} ",
"code" : "0x60003560e060020a90048063380e439614601f578063c040622614602f57005b6025603f565b8060005260206000f35b603560f0565b8060005260206000f35b60006000600060009150600092508160001460585760d3565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe782131560ca575b600a82121560945781806001019250506080565b81600a14609f5760c6565b600a90505b60008160ff16111560c55781806001900392505080806001900391505060a4565b5b60d2565b6000925060eb565b5b8160001460de5760e6565b6001925060eb565b600092505b505090565b600060f8603f565b90509056",
"code" : "0x7c01000000000000000000000000000000000000000000000000000000006000350463380e439681146037578063c040622614604757005b603d6084565b8060005260206000f35b604d6057565b8060005260206000f35b6000605f6084565b600060006101000a81548160ff0219169083021790555060ff60016000540416905090565b6000808160011560cd575b600a82121560a157600190910190608f565b81600a1460ac5760c9565b50600a5b60008160ff16111560c85760019182900391900360b0565b5b60d5565b6000925060ed565b8160001460e05760e8565b6001925060ed565b600092505b50509056",
"nonce" : "0",
"storage" : {
}
@ -435,6 +496,18 @@
"currentNumber" : "0",
"currentTimestamp" : 1,
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
"nonce" : "1"
},
"d2571607e241ecf590ed94b12d87c94babe36db6" : {
"balance" : "0",
"code" : "0x60003560e060020a90048062f55d9d14601e578063b9c3d0a514602d57005b60276004356046565b60006000f35b6033603d565b8060005260206000f35b600060e1905090565b80600160a060020a0316ff5056",
"nonce" : "0",
"storage" : {
}
}
},
"pre" :
{
@ -499,6 +572,15 @@
"currentTimestamp" : 1,
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
"nonce" : "1",
"storage" : {
"0x" : "0xe1",
"0x01" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87"
}
}
},
"pre" :
{
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
@ -563,6 +645,11 @@
"currentTimestamp" : 1,
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
"2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : {
"balance" : "60000"
}
},
"pre" :
{
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
@ -584,7 +671,7 @@
"//" : " testRecursiveMethods(); ",
"//" : " } ",
"//" : "}",
"code" : "0x60003560e060020a90048063296df0df1460295780634893d88a146035578063981a316514604157005b602f604d565b60006000f35b603b6062565b60006000f35b6047605a565b60006000f35b5b600115605857604e565b565b60606062565b565b6068605a565b56",
"code" : "0x7c01000000000000000000000000000000000000000000000000000000006000350463296df0df811460415780634893d88a14604d578063981a316514605957005b60476065565b60006000f35b6053607a565b60006000f35b605f6072565b60006000f35b5b6001156070576066565b565b6078607a565b565b60806072565b56",
"nonce" : "0",
"storage" : {
}
@ -600,7 +687,7 @@
{
"data" : "testRecursiveMethods()",
"data" : "0x981a3165",
"gasLimit" : "30000",
"gasLimit" : "60000",
"gasPrice" : "1",
"nonce" : "0",
"secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8",
@ -618,6 +705,11 @@
"currentTimestamp" : 1,
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
"2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : {
"balance" : "300000"
}
},
"pre" :
{
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
@ -673,6 +765,36 @@
"currentTimestamp" : 1,
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
"nonce" : "3",
"storage" : {
"0x" : "0x095e7baea6a6c7c4c2dfeb977efac326af552d87",
"0x01" : "0x04"
}
},
"5d35480c6e7f8952363fa280a0a96906da981f63" : {
"balance" : "2"
},
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : {
"nonce" : "1"
},
"b88de88b35ecbf3c141e3caae2baf35834d18f63" : {
"storage" : {
"0x" : "0x02"
}
},
"c506eeab8810e0b592686a218b889284e45b2c35" : {
"storage" : {
"0x" : "0x01"
}
},
"d2571607e241ecf590ed94b12d87c94babe36db6" : {
"storage" : {
"0x" : "0x03"
}
}
},
"pre" :
{
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
@ -752,6 +874,11 @@
"currentTimestamp" : 1,
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
"2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : {
"balance" : "300000"
}
},
"pre" :
{
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
@ -831,6 +958,13 @@
"currentTimestamp" : 1,
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"expect" : {
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
"storage" : {
"0x" : "0x014f"
}
}
},
"pre" :
{
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {

Loading…
Cancel
Save