{
    "Function": "findYFromX",
    "File": "src/contracts/libraries/BN254.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [
        "addmod(uint256,uint256,uint256)",
        "expMod",
        "mulmod(uint256,uint256,uint256)",
        "mulmod(uint256,uint256,uint256)"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function findYFromX(uint256 x)\n        internal view returns(uint256, uint256)\n    {\n        // beta = (x^3 + b) % p\n        uint256 beta = addmod(mulmod(mulmod(x, x, FP_MODULUS), x, FP_MODULUS), 3, FP_MODULUS);\n\n        // y^2 = x^3 + b\n        // this acts like: y = sqrt(beta) = beta^((p+1) / 4)\n        uint256 y = expMod(beta, 0xc19139cb84c680a6e14116da060561765e05aa45a1c72a34f082305b61f3f52, FP_MODULUS);\n\n        return (beta, y);\n    }"
}