Research Article
EtherFuzz: Mutation Fuzzing Smart Contracts for TOD Vulnerability Detection
Algorithm 1
Test data generation algorithm.
Input: Sinterface:the ABI of the contract under test | Output:test data | 1: dataType=analyze(Sinterface); | 2: if parameterType==addresType then | 3: contractPool=GeneratePool(Sinterface); | 4: testdata=ranselectAddress(contractPool); | 5: end | 6: if parameterType==fixedType then | 7: testdata=ranselectData(fixedSize); | 8: end | 9: if parameterType==nonfixedType then | 10: length=randomNumber(); | 11: testdata=ranselectData(length); | 12: end |
|