Skip to content

Commit

Permalink
Update EIP-1470
Browse files Browse the repository at this point in the history
New test case configuration proposed in SmartContractSecurity/SWC-registry#168
  • Loading branch information
thec00n authored Feb 14, 2019
1 parent a97dc43 commit 943980c
Showing 1 changed file with 28 additions and 15 deletions.
43 changes: 28 additions & 15 deletions EIPS/eip-1470.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,37 @@ Test cases include crafted as well as real-world samples of vulnerable smart con

1. Source code of a smart contract sample; e.g. Solidity, Vyper, etc.
2. Compiled asset from an EVM compiler in machine readable format; e.g. JSON or ethPM.
3. Test result configuration that describes which and how many instances of a weakness variant can be found in a given sample. The YAML schema for the proposed test result configuration is listed below.
3. Test result configuration that describes which and how many instances of a weakness variant can be found in a given sample. The YAML schema for the proposed test case configuration is listed below.

```YAML
description:
type: string
required: true
issues:
- id:
title: SWC config
type: object
required:
- description
- issues
properties:
description:
type: string
required: true
count:
type: number
required: true
locations:
- bytecode_offsets:
- type: number
line_numbers:
- type: number
issues:
title: Issues
type: array
items:
title: Issue
type: object
required:
- id
- count
properties:
id:
type: string
count:
type: number
locations:
items:
bytecode_offsets:
type: object
line_numbers:
type: object
```
## Implementation
Expand Down

0 comments on commit 943980c

Please sign in to comment.