{
    "Function": "passThruGate",
    "File": "contracts/SpeedBumpPriceGate.sol",
    "Parent Contracts": [
        "interfaces/IPriceGate.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [
        "require(bool,string)",
        "getCost",
        "require(bool,string)"
    ],
    "Library Calls": [],
    "Low-Level Calls": [
        "call"
    ],
    "Code": "function passThruGate(uint index, address) override external payable {\n        uint price = getCost(index);\n        require(msg.value >= price, 'Please send more ETH');\n\n        // bump up the price\n        Gate storage gate = gates[index];\n        // multiply by the price increase factor\n        gate.lastPrice = (price * gate.priceIncreaseFactor) / gate.priceIncreaseDenominator;\n        // move up the reference\n        gate.lastPurchaseBlock = block.number;\n\n        // pass thru the ether\n        if (msg.value > 0) {\n            // use .call so we can send to contracts, for example gnosis safe, re-entrance is not a threat here\n            (bool sent, bytes memory data) = gate.beneficiary.call{value: msg.value}(\"\");\n            require(sent, 'ETH transfer failed');\n        }\n    }"
}