{
    "Function": "claim",
    "File": "contracts/token/MerkleDistributor.sol",
    "Parent Contracts": [
        "contracts/token/interfaces/IMerkleDistributor.sol"
    ],
    "High-Level Calls": [
        "IERC20",
        "MerkleProof"
    ],
    "Internal Calls": [
        "require(bool,string)",
        "require(bool,string)",
        "abi.encodePacked()",
        "_setClaimed",
        "keccak256(bytes)",
        "isClaimed",
        "require(bool,string)"
    ],
    "Library Calls": [
        "verify"
    ],
    "Low-Level Calls": [],
    "Code": "function claim(uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof) external override {\n        require(!isClaimed(index), 'MerkleDistributor: Drop already claimed.');\n\n        // Verify the merkle proof.\n        bytes32 node = keccak256(abi.encodePacked(index, account, amount));\n        require(MerkleProof.verify(merkleProof, merkleRoot, node), 'MerkleDistributor: Invalid proof.');\n\n        // Mark it claimed and send the token.\n        _setClaimed(index);\n        require(IERC20(token).transfer(account, amount), 'MerkleDistributor: Transfer failed.');\n\n        emit Claimed(index, account, amount);\n    }"
}