Skip to content

Instantly share code, notes, and snippets.

@shanefontaine
Last active September 26, 2018 19:57
Show Gist options
  • Save shanefontaine/c4a4aa72475131981afb23a844a983f2 to your computer and use it in GitHub Desktop.
Save shanefontaine/c4a4aa72475131981afb23a844a983f2 to your computer and use it in GitHub Desktop.
Mythril Marketplace Contracts Output

Analysis results for FakeERC20.json

Exception state

  • Type: Informational
  • Contract: FakeERC20
  • Function name: _function_0x23b872dd
  • PC address: 4256

Description

A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that assert() should only be used to check invariants. Use require() for regular input checking. In file: FakeERC20.json:11

Analysis results for FakeMarketplace.json

Message call to external contract

  • Type: Warning
  • Contract: FakeMarketplace
  • Function name: _function_0x9b214f77
  • PC address: 7650

Description

This contract executes a message call to an address provided as a function argument. Generally, it is not recommended to call user-supplied addresses using Solidity's call() construct. Note that attackers might leverage reentrancy attacks to exploit race conditions or manipulate this contract's state. In file: FakeMarketplace.json:11

Analysis result for AddressUtils

No issues found.

Analysis result for ERC165Support

No issues found.

Analysis result for SafeMath

No issues found.

Analysis results for BasicToken.json

Exception state

  • Type: Informational
  • Contract: BasicToken
  • Function name: _function_0xa9059cbb
  • PC address: 991

Description

A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that assert() should only be used to check invariants. Use require() for regular input checking. In file: BasicToken.json:44

Code

ed by the pass

Analysis results for Marketplace.json

Message call to external contract

  • Type: Warning
  • Contract: Marketplace
  • Function name: _function_0x9b214f77
  • PC address: 7650

Description

This contract executes a message call to an address provided as a function argument. Generally, it is not recommended to call user-supplied addresses using Solidity's call() construct. Note that attackers might leverage reentrancy attacks to exploit race conditions or manipulate this contract's state. In file: Marketplace.json:236

Code

verifiableNftRegistry.supportsInterface(InterfaceId_ValidateFingerprint)

Analysis result for Migratable

No issues found.

Analysis results for StandardToken.json

Exception state

  • Type: Informational
  • Contract: StandardToken
  • Function name: _function_0x23b872dd
  • PC address: 4097

Description

A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that assert() should only be used to check invariants. Use require() for regular input checking. In file: StandardToken.json:32

Code

g.sender].sub(

Analysis results for FakeVerifiableERC721.json

Exception state

  • Type: Informational
  • Contract: FakeVerifiableERC721
  • Function name: _function_0x40c10f19
  • PC address: 11896

Description

A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that assert() should only be used to check invariants. Use require() for regular input checking. In file: FakeVerifiableERC721.json:34

Integer Overflow

  • Type: Warning
  • Contract: FakeVerifiableERC721
  • Function name: _function_0x162094c4
  • PC address: 12083

Description

A possible integer overflow exists in the function _function_0x162094c4. The addition or multiplication may result in a value higher than the maximum representable integer. In file: FakeVerifiableERC721.json:6

Code

contract FakeVerifiableERC721 is FakeERC721 {
  constructor(string name, string symbol) public
  FakeERC721(name, symbol) {}

  function verifyFingerprint(uint256 assetId, bytes fingerprint) public pure returns (bool) {
    return getFingerprint(assetId) == _bytesToBytes32(fingerprint);
  }

  function getFingerprint(uint256 /*assetId*/) public pure returns (bytes32) {
    return 0x1234;
  }

  function _supportsInterface(bytes4 _interfaceId) internal view returns (bool) {
    // solium-disable-next-line operator-whitespace
    return super._supportsInterface(_interfaceId) ||
      _interfaceId == bytes4(keccak256("verifyFingerprint(uint256,bytes)"));
  }

  function _bytesToBytes32(bytes b) internal pure returns (bytes32) {
    bytes32 out;

    for (uint i = 0; i < b.length; i++) {
      out |= bytes32(b[i] & 0xFF) >> i.mul(8);
    }

    return out;
  }
}

Integer Overflow

  • Type: Warning
  • Contract: FakeVerifiableERC721
  • Function name: _function_0x162094c4
  • PC address: 12097

Description

A possible integer overflow exists in the function _function_0x162094c4. The addition or multiplication may result in a value higher than the maximum representable integer. In file: FakeVerifiableERC721.json:6

Code

contract FakeVerifiableERC721 is FakeERC721 {
  constructor(string name, string symbol) public
  FakeERC721(name, symbol) {}

  function verifyFingerprint(uint256 assetId, bytes fingerprint) public pure returns (bool) {
    return getFingerprint(assetId) == _bytesToBytes32(fingerprint);
  }

  function getFingerprint(uint256 /*assetId*/) public pure returns (bytes32) {
    return 0x1234;
  }

  function _supportsInterface(bytes4 _interfaceId) internal view returns (bool) {
    // solium-disable-next-line operator-whitespace
    return super._supportsInterface(_interfaceId) ||
      _interfaceId == bytes4(keccak256("verifyFingerprint(uint256,bytes)"));
  }

  function _bytesToBytes32(bytes b) internal pure returns (bytes32) {
    bytes32 out;

    for (uint i = 0; i < b.length; i++) {
      out |= bytes32(b[i] & 0xFF) >> i.mul(8);
    }

    return out;
  }
}

Analysis result for Pausable

No issues found.

Analysis result for ERC721Token

No issues found.

Analysis result for ERC721BasicToken

No issues found.

Analysis results for FakeERC721.json

Exception state

  • Type: Informational
  • Contract: FakeERC721
  • Function name: _function_0x40c10f19
  • PC address: 11285

Description

A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that assert() should only be used to check invariants. Use require() for regular input checking. In file: FakeERC721.json:23

Integer Overflow

  • Type: Warning
  • Contract: FakeERC721
  • Function name: _function_0x162094c4
  • PC address: 11363

Description

A possible integer overflow exists in the function _function_0x162094c4. The addition or multiplication may result in a value higher than the maximum representable integer. In file: FakeERC721.json:6

Code

contract FakeERC721 is ERC721Token {
  constructor(string name, string symbol) public {
    ERC721Token.initialize(name, symbol);
  }

  function mint(address _to, uint256 _tokenId) public {
    super._mint(_to, _tokenId);
  }

  function burn(uint256 _tokenId) public {
    super._burn(ownerOf(_tokenId), _tokenId);
  }

  function setTokenURI(uint256 _tokenId, string _uri) public {
    super._setTokenURI(_tokenId, _uri);
  }
}

Integer Overflow

  • Type: Warning
  • Contract: FakeERC721
  • Function name: _function_0x162094c4
  • PC address: 11377

Description

A possible integer overflow exists in the function _function_0x162094c4. The addition or multiplication may result in a value higher than the maximum representable integer. In file: FakeERC721.json:6

Code

contract FakeERC721 is ERC721Token {
  constructor(string name, string symbol) public {
    ERC721Token.initialize(name, symbol);
  }

  function mint(address _to, uint256 _tokenId) public {
    super._mint(_to, _tokenId);
  }

  function burn(uint256 _tokenId) public {
    super._burn(ownerOf(_tokenId), _tokenId);
  }

  function setTokenURI(uint256 _tokenId, string _uri) public {
    super._setTokenURI(_tokenId, _uri);
  }
}

Analysis result for Ownable

No issues found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment