{
    "Function": "checkAndPullByType",
    "File": "src/libraries/DelegateTokenTransferHelpers.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [
        "checkERC721BeforePull",
        "pullERC1155AfterCheck",
        "revert InvalidTokenType(IDelegateRegistry.DelegationType)",
        "pullERC721AfterCheck",
        "checkERC20BeforePull",
        "pullERC20AfterCheck",
        "checkERC1155BeforePull"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function checkAndPullByType(Structs.Uint256 storage erc1155Pulled, Structs.DelegateInfo calldata delegateInfo) internal {\n        if (delegateInfo.tokenType == IDelegateRegistry.DelegationType.ERC721) {\n            checkERC721BeforePull(delegateInfo.amount, delegateInfo.tokenContract, delegateInfo.tokenId);\n            pullERC721AfterCheck(delegateInfo.tokenContract, delegateInfo.tokenId);\n        } else if (delegateInfo.tokenType == IDelegateRegistry.DelegationType.ERC20) {\n            checkERC20BeforePull(delegateInfo.amount, delegateInfo.tokenContract, delegateInfo.tokenId);\n            pullERC20AfterCheck(delegateInfo.tokenContract, delegateInfo.amount);\n        } else if (delegateInfo.tokenType == IDelegateRegistry.DelegationType.ERC1155) {\n            checkERC1155BeforePull(erc1155Pulled, delegateInfo.amount);\n            pullERC1155AfterCheck(erc1155Pulled, delegateInfo.amount, delegateInfo.tokenContract, delegateInfo.tokenId);\n        } else {\n            revert Errors.InvalidTokenType(delegateInfo.tokenType);\n        }\n    }"
}