{
    "Function": "store",
    "File": "contracts/NestedRecords.sol",
    "Parent Contracts": [
        "node_modules/@openzeppelin/contracts/access/Ownable.sol",
        "node_modules/@openzeppelin/contracts/utils/Context.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [
        "require(bool,string)",
        "onlyFactory",
        "updateHoldingAmount",
        "createRecord"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function store(\n        uint256 _nftId,\n        address _token,\n        uint256 _amount,\n        address _reserve\n    ) external onlyFactory {\n        Holding memory holding = records[_nftId].holdings[_token];\n        if (holding.isActive) {\n            require(records[_nftId].reserve == _reserve, \"NestedRecords: RESERVE_MISMATCH\");\n            updateHoldingAmount(_nftId, _token, holding.amount + _amount);\n            return;\n        }\n        createRecord(_nftId, _token, _amount, _reserve);\n    }"
}