{
    "Function": "insert",
    "File": "contracts/RubiconMarket.sol",
    "Parent Contracts": [
        "contracts/RubiconMarket.sol",
        "contracts/RubiconMarket.sol",
        "contracts/RubiconMarket.sol",
        "contracts/RubiconMarket.sol",
        "contracts/RubiconMarket.sol",
        "contracts/RubiconMarket.sol",
        "contracts/RubiconMarket.sol",
        "contracts/RubiconMarket.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [
        "require(bool)",
        "require(bool,string)",
        "require(bool)",
        "isActive",
        "_sort",
        "_hide",
        "isOfferSorted"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function insert(\n        uint256 id, //maker (ask) id\n        uint256 pos //position to insert into\n    ) public returns (bool) {\n        require(!locked, \"Reentrancy attempt\");\n        require(!isOfferSorted(id)); //make sure offers[id] is not yet sorted\n        require(isActive(id)); //make sure offers[id] is active\n\n        _hide(id); //remove offer from unsorted offers list\n        _sort(id, pos); //put offer into the sorted offers list\n        emit LogInsert(msg.sender, id);\n        return true;\n    }"
}