> For the complete documentation index, see [llms.txt](https://fuzzing.gitbook.io/sfuzz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fuzzing.gitbook.io/sfuzz/sample-contract.md).

# sFuzz Ouputs

Sample contract and its generated outputs

The code block contains main contract: `BountyHunt.sol` and its generated files. This contract encounters exception disorder and `reentrancy` vulnerabilities. The below picture shows terminal output of fuzzing process

{% tabs %}
{% tab title="BountyHunt.sol" %}

```javascript
/**
 * Source Code first verified at https://etherscan.io on Monday, August 14, 2017
 (UTC) */

pragma solidity ^0.4.24;

contract BountyHunt {
  mapping(address => uint) public bountyAmount;
  uint public totalBountyAmount;

  modifier preventTheft {
    _;
    if (this.balance < totalBountyAmount) throw;
  }

  function grantBounty(address beneficiary, uint amount) payable preventTheft {
    bountyAmount[beneficiary] += amount;
    totalBountyAmount += amount;
  }

  function claimBounty() preventTheft {
    uint balance = bountyAmount[msg.sender];
    if (msg.sender.call.value(balance)()) {
      totalBountyAmount -= balance;
      bountyAmount[msg.sender] = 0;
    }
  }

  function transferBounty(address to, uint value) preventTheft {
    if (bountyAmount[msg.sender] >= value) {
      bountyAmount[to] += value;
      bountyAmount[msg.sender] -= value;
    }
  }
}
```

{% endtab %}

{% tab title="**TEST\_\_1**.json" %}

```
{
    "functions": [
        {
            "name": "transferBounty",
            "inputs": [
                {
                    "type": "address",
                    "value": "0x0000000000000000000000000000000000000000000000000000000000000000"
                },
                {
                    "type": "uint256",
                    "value": "0x0000000000000000000000000000000000000000000000000000000000000000"
                }
            ]
        },
        {
            "name": "grantBounty",
            "inputs": [
                {
                    "type": "address",
                    "value": "0x0000000000000000000000000000000000000000000000000000000000000000"
                },
                {
                    "type": "uint256",
                    "value": "0x0000000000000000000000000000000000000000000000000000000000000000"
                }
            ]
        },
        {
            "name": "claimBounty",
            "inputs": ""
        }
    ],
    "accounts": [
        {
            "address": "0x00000000000000000000000000000000000000f0",
            "balance": "78918677504442992524819169280"
        },
        {
            "address": "0x0000000000000000000000000000000000000000",
            "balance": "0"
        }
    ]
}
```

{% endtab %}

{% tab title="**TEST\_\_1**.order" %}

```javascript
[0,1,2
```

{% endtab %}

{% tab title="**TEST\_\_2**.json" %}

```javascript
{
    "functions": [
        {
            "name": "transferBounty",
            "inputs": [
                {
                    "type": "address",
                    "value": "0x0000000000000000000000000000000000000000000000000000000000000000"
                },
                {
                    "type": "uint256",
                    "value": "0x0000000000000000000000000000000000000000000000000000000000000000"
                }
            ]
        },
        {
            "name": "grantBounty",
            "inputs": [
                {
                    "type": "address",
                    "value": "0x0000000000000000000000000000000000000000000000000000000000000000"
                },
                {
                    "type": "uint256",
                    "value": "0x0000000000000000000000000000000000000000000000000000000000000000"
                }
            ]
        },
        {
            "name": "claimBounty",
            "inputs": ""
        }
    ],
    "accounts": [
        {
            "address": "0x00000000000000000000000000000000000000f0",
            "balance": "78918677504442992524819169280"
        },
        {
            "address": "0x0000000000000000000000000000000000000000",
            "balance": "0"
        }
    ]
}
```

{% endtab %}

{% tab title="**TEST\_\_2**.order" %}

```javascript
[0,1,2]
```

{% endtab %}
{% endtabs %}

![](https://1832815854-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LePiGzGClluV5yuaDTF%2F-LeRGRB27_HCVW1_nUjw%2F-LeRGWYHgTnG90qGOkzY%2FScreenshot%20from%202019-05-09%2016-23-08.jpg?alt=media\&token=33f7f856-098e-469f-a56c-e784c5073eed)
