|
|
|
@ -2,13 +2,13 @@ import unittest |
|
|
|
|
from mythril.ethereum.evmcontract import EVMContract |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ETHContractTestCase(unittest.TestCase): |
|
|
|
|
class EVMContractTestCase(unittest.TestCase): |
|
|
|
|
def setUp(self): |
|
|
|
|
self.code = "0x60606040525b603c5b60006010603e565b9050593681016040523660008237602060003683856040603f5a0204f41560545760206000f35bfe5b50565b005b73c3b2ae46792547a96b9f84405e36d0e07edcd05c5b905600a165627a7a7230582062a884f947232ada573f95940cce9c8bfb7e4e14e21df5af4e884941afb55e590029" |
|
|
|
|
self.creation_code = "0x60606040525b603c5b60006010603e565b9050593681016040523660008237602060003683856040603f5a0204f41560545760206000f35bfe5b50565b005b73c3b2ae46792547a96b9f84405e36d0e07edcd05c5b905600a165627a7a7230582062a884f947232ada573f95940cce9c8bfb7e4e14e21df5af4e884941afb55e590029" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Getinstruction_listTestCase(ETHContractTestCase): |
|
|
|
|
class Getinstruction_listTestCase(EVMContractTestCase): |
|
|
|
|
def runTest(self): |
|
|
|
|
contract = EVMContract(self.code, self.creation_code) |
|
|
|
|
|
|
|
|
@ -21,7 +21,7 @@ class Getinstruction_listTestCase(ETHContractTestCase): |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class GetEASMTestCase(ETHContractTestCase): |
|
|
|
|
class GetEASMTestCase(EVMContractTestCase): |
|
|
|
|
def runTest(self): |
|
|
|
|
contract = EVMContract(self.code) |
|
|
|
|
|
|
|
|
@ -33,7 +33,7 @@ class GetEASMTestCase(ETHContractTestCase): |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class MatchesExpressionTestCase(ETHContractTestCase): |
|
|
|
|
class MatchesExpressionTestCase(EVMContractTestCase): |
|
|
|
|
def runTest(self): |
|
|
|
|
contract = EVMContract(self.code) |
|
|
|
|
|