github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/js/src/solts/sol/Contains.sol (about)

     1  pragma solidity >=0.0.0;
     2  
     3  contract Contains {
     4      function contains(address[] memory _list, address _value) public pure returns (bool) {
     5  	    for (uint i = 0; i < _list.length; i++) {
     6  	        if (_list[i] == _value) return true;
     7  	    }
     8  	    return false;
     9      }
    10  
    11      function contains(uint[] memory _list, uint _value) public pure returns (bool) {
    12  	    for (uint i = 0; i < _list.length; i++) {
    13  	        if (_list[i] == _value) return true;
    14  	    }
    15  	    return false;
    16      }
    17  }